Releases: Kenny2github/discord-ext-slash
Releases · Kenny2github/discord-ext-slash
0.1.0
Changes
New Stuff
- Subcommands
- Since groups can't be executed on their own, their coroutines are used as checks instead.
Command.parent
references its parent groupCommand.qualname
gives the fully qualified nameclass Group
:@.slash_cmd()
,@.slash_group()
@SlashBot.slash_group()
,@slash.group()
Context.options
is a dict of option names to values that will be passed/have been passed to the command coroutinelogging.getLogger('discord.ext.status')
@Command.check
registers a command-specific checkcheck
is also a new kwarg inCommand.__init__
Choice.from_data
supports string values (which are doubled) and dict values (which are**
ed) andChoice
values (which are passed through)Option.choices
hasChoice.from_data
mapped onto itdemo_bot.py
is an example of how to use the library
Changed
Command.method
renamed toCommand.coro
- Slash commands will only start being dispatched once the
ready
event is triggered the first time - The
CommandNotFound
error is directly raised instead of dispatched through the event system - Interaction objects are now only supported at version
1
.
Fixes
- Some
ext.commands
things broke becauseCommand.cog
didn't exist. It does now, and is alwaysNone
- When
Context.guild
is adiscord.Object
, that used to cause the member fetching to fail because of anAttributeError
allowed_mentions
was being ignored inrespond
ifSlashBot.allowed_mentions
wasNone
- Reusing the same
Option
instance used to set the name of all options that use it to be the same. Now the instance is cloned instead. - Options with choices used to be broken because
Option.to_dict
didn't callChoice.to_dict
0.0.0
First release - supports base commands. (Option choices are broken.)