BLANKHumanity / blank-humanity-discord-bot

2 stars 0 forks source link

Bump JDA from 5.0.0-alpha.9 to 5.0.0-alpha.13 #73

Closed dependabot[bot] closed 1 year ago

dependabot[bot] commented 2 years ago

Bumps JDA from 5.0.0-alpha.9 to 5.0.0-alpha.13.

Release notes

Sourced from JDA's releases.

v5.0.0-alpha.13

Overview

In this release, we have taken some time to rework the handling of Emoji and Stickers! This comes with a lot of breaking changes.

Guild Emote Renamed (#2117)

Previously, all custom emoji were called Emote in JDA. This has been changed to be more consistent with the API naming convention of Custom Emoji. In that sense, we renamed Emote to RichCustomEmoji and made various changes all over the API to rename all occurrences of Emote with Emoji.

This also comes with some compatibility improvements! With this change, we now have a uniform representation of all emoji in the library. Every emoji now implements the Emoji interface and can be used interchangeably as such. For instance, the reactions used to have a specific type called ReactionEmote, which is now just replaced with Emoji allowing you to use them in buttons!

public void onMessageReactionAdd(MessageReactionAddEvent event) {
  event.getChannel().sendMessage("User reacted")
    .setActionRow(Button.primary("buttonid", event.getEmoji())) // <- replacement for getReactionEmote()
    .queue();
}

Stickers (#2104)

In addition to the changes for emoji, we now have a full support for stickers! Bots can send up to 3 guild stickers in a message (but not in interactions). However, this is limited to only stickers from the same guild, so likely not useful to most bots.

This comes with support for:

  • Creating/Updating/Deleting guild stickers
  • Getting and sending stickers with messages
  • Access to nitro sticker packs (not sending though)
  • Full sticker event support

ChunkingFilter Breaking Change (#2053)

Previously, when you did setChunkingFilter(ChunkingFilter.ALL), we would always cache every member of the guild for the full runtime. This has been changed now, allowing you to further configure the member cache policy in addition to chunking. Now, to chunk and cache all members of a guild, you can use setChunkingFilter(ChunkingFilter.ALL).setMemberCachePolicy(MemberCachePolicy.ALL).

This is a breaking change and affects anyone using ChunkingFilter.

Command Permissions (#2113)

Discord made breaking changes to command permissions (aka Privileges). This means you can no longer configure the privileges of a command on a guild, without using oauth. Consequently, we updated our interface with breaking changes to address this.

Instead of using setDefaultEnabled(..) on your command and configuring a whitelist/blacklist of roles and users, you now have the ability to configure allowed permissions using setDefaultPermissions(...) and you can tell discord that a command is guild only with setGuildOnly(true).

However, you cannot configure this for individual subcommands, due to the way discord designed them.

Check out the SlashBotExample for some useful examples on how this works!

New Features

... (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 1 year ago

Superseded by #75.