Migration Guide (<1.0.0b)¶
v1.0.0b introduced a large number of breaking changes.
- Renamed
dispike.register
todispike.creating
. - Moved
allow_mentions
file fromdispike.models
todispike.creating
- Moved
components
fromdispike.helper
todispike.creating
- Renamed
dispike.models
todispike.incoming
- Renamed
incoming
indispike.incoming
toincoming_interactions
bot.interactions.on
has been deprecated. Please usebot.on
instead ordispike.interactions.on
.EventHandler
class has been removed, most of the functions have been implemented insideDispike
- The following commands now will raise an
DiscordAPIError
if the Discord API returns an unexpected status code. set_command_permission
async_set_command_permission
async_get_command_permission_in_guild
async_get_all_command_permissions_in_guild
get_all_command_permissions_in_guild
get_command_permission_in_guild
- Bot Tokens are no longer required to initialize a
Dispike
object.. Accessing methods, attributes or functions that require a bot token (such as registering commands) will now raise a new exception:dispike.errors.dispike.BotTokenNotProvided
. Certain features are still available without a bot token. Such as sending deferred messages or just responding to interactions. (closes #51) - DiscordResponse will now raise an exception
dispike.errors.responses.InvalidDiscordResponse
for certain combinations of values. (closes #50) -
Added
default_permission
toDiscordCommand
.. Learn more here. This value is set toTrue
by default. (closes #53) -
Accessing methods such as
.lookup_resolved_channel
inIncomingDiscordInteraction
with no resolved structures will now raisedispike.errors.response.NoResolvedInteractions
. -
CommandTypes
has been changed toOptionTypes
. A new class of actual command types has been added. IncomingDiscordOptionList
changed toIncomingDiscordSlashData
to better match what it actually is.IncomingDiscordInteraction
changed toIncomingDiscordSlashInteraction
DiscordCommand
now takes a type which defaults toCommandTypes.SLASH
(AKA Type 1)DiscordCommand
now validates that slash commands contain a description.-
DiscordCommand
now validates that context commands (Currently onlyMESSAGE
,USER
) do not have a description or options. -
New events:
MESSAGE_COMMAND
USER_COMMAND
-
New WIP classes
Message
andMessageAttachment
. Discord says they will add attachments as a option type in the future. - New
IncomingInteraction
ctx classesIncomingDiscordUserCommandInteraction
andIncomingDiscordMessageCommandInteraction