This repository was archived by the owner on Feb 3, 2025. It is now read-only.
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.parentreferences its parent groupCommand.qualnamegives the fully qualified nameclass Group:@.slash_cmd(),@.slash_group()@SlashBot.slash_group(),@slash.group()
Context.optionsis a dict of option names to values that will be passed/have been passed to the command coroutinelogging.getLogger('discord.ext.status')@Command.checkregisters a command-specific checkcheckis also a new kwarg inCommand.__init__Choice.from_datasupports string values (which are doubled) and dict values (which are**ed) andChoicevalues (which are passed through)Option.choiceshasChoice.from_datamapped onto itdemo_bot.pyis an example of how to use the library
Changed
Command.methodrenamed toCommand.coro- Slash commands will only start being dispatched once the
readyevent is triggered the first time - The
CommandNotFounderror is directly raised instead of dispatched through the event system - Interaction objects are now only supported at version
1.
Fixes
- Some
ext.commandsthings broke becauseCommand.cogdidn't exist. It does now, and is alwaysNone - When
Context.guildis adiscord.Object, that used to cause the member fetching to fail because of anAttributeError allowed_mentionswas being ignored inrespondifSlashBot.allowed_mentionswasNone- Reusing the same
Optioninstance 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_dictdidn't callChoice.to_dict
0.0.0
First release - supports base commands. (Option choices are broken.)