Releases: freya022/BotCommands
Releases · freya022/BotCommands
2.5.0 - JDA 5 alpha 18 & help rework
Changes
Additions
- Add optional paginator controls to interactive menus (#37)
Changes
Full Changelog: BotCommands-2.4.1...2.5.0
2.4.1 - Modals, perms V2, new localization, publishing
Changes
Updates
- Use Java 17 (with preview features), see README on how to enable them
- Use JDA 5 alpha 16
Application commands
- Added a
Guild
parameter toSlashParameterResolver#getPredefinedChoices
- Changed developer error replies (such as for invalid resolved types) to exceptions
- Replaced perms V1 with perms V2
- Removed
guildOnly
for application commands, replaced with a scope enumeration - Added
defaultLocked
to lock a command to administrators by default, overrides defined user permissions
- Removed
Misc
EventWaiterBuilder#submit
returns aCompletableFuture
- Reworked localization / default messages, see
DefaultMessages
- Use Minn's fork of
emoji-java
Additions
Application commands
- Added modals, see
Modals
- Added command IDs, they allow you to have multiple commands with the same path, but with different target guilds, and potentially different options
- Added default values, these are options that can be substituted on a per-guild basis, with
GuildApplicationSettings#getDefaultValueSupplier
- Added varargs for slash commands, they work the same way as java except you can specify how many of the arguments are optional
- Reintroduce
ApplicationCommandsBuilder#forceCommandsAsGuildOnly
- Added an
Attachment
resolver - Allow subcommands with subcommand groups, in the same top-level command
- Example:
/tag send
+/tag manage create
- Example:
Commands
- Support command localization, they use a similar format to the MessageFormat API, but with named parameters, see
DefaultLocalizationMapProvider
,Localization
andDefaultLocalizationTemplate
Misc
- Added
ExtensionsBuilder#registerDynamicInstanceSupplier
to let Spring users supply command instances - Added Kotlin sources
- Added maven central publishing
- Going forward, I will be using a
Major.Minor.Revision
scheme, major for big breaking changes, minor for minor breaking changes, including features/bugfix, and revision for non-breaking features/bugfixes master
should now get updates with smaller PRs, and releases would be done to maven central when appropriate- This will let the main page to be more frequently updated vs having to select the newer branch everytime
- Going forward, I will be using a
Full Changelog: 2.3.0...BotCommands-2.4.1
2.3.0 - JDA 5 support
Please do not use this tag as several updates have been made to fix Discord:tm:, use the latest commit of the master branch, or latest of other branches
Changed
Components
- Removed owner ids for interaction constraints
- Optimized SQL code a bit
Application commands
- Fixed some command updating issues
Autocomplete
- Don't show user inputs when there are no choices
- Continuity autocompletion is now case insensitive
- Allow
Collection
to be returned instead ofList
for autocomplete results
Misc
- Cooldown - Optimized user cooldown map
- Added
@SubscribeEvent
to internal listeners - Pass pagination instances to pagination suppliers
Added
Application commands
- Added application command online checks
- Added
SlashCommandResolver#getOptionType
, give more parameters to resolver methods - Added
SlashCommandResolver#getPredefinedChoices
- Added application / component filters
Autocomplete
- Added autocomplete caching
Misc
- Expose test files, they are still not recommended as examples
- Support for JDA 5 & the new interactions
- Add support for
suspend
methods on text / slash / persistent component listeners @Test
annotation, these commands are pushed only to specified guilds- Added Discord threads support
- Added IntelliJ live templates
2.2.0
Changed
- Updated to a JDA 5 fork (with autocomplete, context menus, min/max and channel types
- Searching for classes in the VM's classpath instead of supplying a
jarPath
- Application commands update should be async, but still requires all shards to be ready
- Updated dependencies
- Only ship API docs
- Moved
DefaultMessages
andLogging
to API package - Replaced
Consumer<ButtonEvent>
andConsumer<SelectEvent>
byButtonConsumer
andSelectConsumer
- Fixed application command updating issues due to JSON content arrangement and possible race conditions
Added
- Auto completion for slash commands (& state aware, which means you can ask for previously sent arguments as to make a better decision)
- Min / Max for slash command options
- Channel types for slash command options (inferred or with annotation)
- Building buttons with
ButtonContent
using string and emojis - Set a 10 minutes cooldown between messages sent to bot owners for exceptions
2.1.0
Additions
- Added
InteractiveMenu
- Added
ButtonContent#withShortcode(String)
- Added
ButtonContent#withEmoji(String)
- Added timeout callbacks on lambda components
- Added
@EventListener
to listen on JDA events, with custom parameters
Changes
- Transformed consumers / functions into specialised interfaces, for better parameter names
- Fixed lambda selection menus not getting unregistered on timeout
- Fixed ignored class detection
2.0.0
What's Changed
Additions
- Using the JDA context menu branch
- Separating packages into API and internal
- Categorised
CommandsBuilder
settings, without breaking the builder pattern - Tracing ignored (not instantiated) classes from the search path
- Added guild-localized default messages (such as command not found, permission error message...)
- Inheritable class-level and method-level
@Description
- Added custom arguments (so for example your command can also accept a JDA instance, the catch being that the real discord options has to be annotated with either
@TextOption
or@AppOption
depending on the context) - Adding resource bundle based localization for application commands only (i will not do it for text commands)
- Reworked text commands to work like application commands, their syntax should be very similar now, while keeping a method that only accepts
CommandEvent
as an (optional) fallback - Help command will add subcommand help by default
- Regex patterns for text commands will throw an exception if they're "too complex"
- Switched to Java 16
- Use fully uppercase
JDA
instead ofJda
Removals
- Removed
@ArgName
and@ArgExample
in favor of@TextOption
- Removed category from
@JDATextCommand
, this is now set with@Category
on the class-level - Removed
PermissionProvider
, its methods have been moved to other classes - Removed permissions from both command types, they are replaced with
@BotPermissions
and@UserPermissions
, which are also class-inheritable
Getting it
You can get this version by replacing VERSION
by 2.0.0
, still by using jitpack as a repository, as explained in the README
As always, I would still recommend using the commit-based version so you can stay up to date more often
1.5.0
+ Added cached slash commands
+ Added component handlers and custom ids
+ Use logging
+ Message only deepest exception cause
- Removed SimpleStream - JDA already closes streams
+ Allow user made parameter resolvers
+ Fix compile error for JDK 13+
+ Added a paginator and menus
+ Use new emoji library for more accurate shortcodes to emoji conversions
+ Add examples
+ Add localized slash commands
+ Updated JDA