ErdbeerbaerLP / DiscordIntegration-Core

Common module for the Discord Integration mod
https://modrinth.com/plugin/dcintegration
4 stars 21 forks source link

Bump JDA from 5.0.0-alpha.5 to 5.0.0-alpha.6 #76

Closed dependabot[bot] closed 2 years ago

dependabot[bot] commented 2 years ago

Bumps JDA from 5.0.0-alpha.5 to 5.0.0-alpha.6.

Release notes

Sourced from JDA's releases.

v5.0.0-alpha.6 | Attachment Options & Breaking Cleanup

Changelog

This release includes a variety of breaking changes that were needed to either correctly model how Discord models things in their API or to better set us up for future development.

In this version, we added a new pattern for options on commands. You can now use getOption(name[, fallback], resolver) to easily get any optional arguments for your commands:

public void onSlashCommandInteraction(SlashCommandInteractionEvent event)
{
    //                              name      fallback          resolver
// null if user is not a member of the guild (fallback not used, since option is mapped to a User instance)
Member member = event.getOption("target", event::getMember, OptionMapping::getAsMember);
// null if fallback is used (getAsUser cannot be null)
User user =     event.getOption("target", null            , OptionMapping::getAsUser);
// null fallback implied
User nullable = event.getOption("target",                   OptionMapping::getAsUser); // <- implicit fallback null

// real use-cases:
int days = event.getOption("days", 7, OptionMapping::getAsInt); // optional ban days
String reason = event.getOption("reason", "banned by mod", OptionMapping::getAsString); // optional ban reason

}

You can also now flip the iteration direction for MessageChannel.getIterableHistory. A common request as of late, was to get the first messages of a channel, which can now be accomplished by doing channel.getIterableHistory().reverse().takeAsync(1000).

New Features

Changes

Removed

... (truncated)

Commits


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
dependabot[bot] commented 2 years ago

Superseded by #77.