Releases: Snazzah/slash-create
Releases · Snazzah/slash-create
v2.1.2
v2.1.1
v2.1.0
Changed:
- Typings for command options have the
type
prop CommandOption
is deprecatedCommandStringOption
,CommandIntegerOption
,CommandBooleanOption
are in the index
Added:
- CommandContexts now support resolved objects
CommandContext#members
,CommandContext#users
,CommandContext#roles
,CommandContext#channels
- Note:
ResolvedMember
s inCommandContext#members
do not havemute
,deaf
andpermissions
properties.
Fixed:
- Updated interaction data typings with the
type
prop
v2.0.0
Migrating from 1.x to 2.0
- Make sure to use
guildIDs
instead ofguildID
in the command options. You can now also use an array of guild IDs to assign the same command to more guilds. ctx.member
andctx.guildID
is no longer guarenteed. Make sure to null-check this or usectx.user
when referencing a user.- If you are in a TypeScript environment, check the changes of this changelog.
SlashCommand#guildID
is nowSlashCommand#guildIDs
, giving an array of strings rather than a singular one.
Changed:
- The typings for
DMInteractionRequestData
andGuildInteractionRequestData
is in the index. - The typing for
InteractionRequestData
is now a type rather than an interface. - The
ping
event now has auser
parameter. - [BREAKING]
CommandContext#member
andCommandContext#guildID
is now only given in a guild context. - [BREAKING]
guildID
in command options is nowguildIDs
. - [BREAKING]
SlashCommand#guildID
has been replaced withSlashCommand#guildIDs
.
Added:
- Support for updating commands in bulk. This is now used in syncing. (#20)
- Support for multiple guild IDs in a command class. (#16)
CommandOptions#guildIDs
can either be a string or an array of strings.
- Support for direct message commands. (#22)
CommandContext#user
can be used in DM and guild contexts.
Fixed:
- Unnessesary command updating while syncing.
v1.3.0
Changed:
- Permission bitfield now uses bigints
- Command syncing now uses
lodash.isEqual
to check for publicKey
in creator options is now optional- Typing changes
CommandOption
in constants has split off intoCommandSubcommandOption
andAnyCommandOption
, not allowing you to define options and a value.- Typings for
User
,Member
andMessage
have been set to read-only - Most undocumented typings are hidden/privated
- Export changes
- Some constant exports now exports to index:
InteractionType
,InterationResponseType
,InteractionResponseFlags
,CommandOptionType
,PartialApplicationCommand
,ApplicationCommand
,ApplicationCommandOption
,ApplicationCommandOptionChoice
,RawRequest
,AnyRequestData
,PingRequestData
,InteractionRequestData
,CommandMember
,CommandUser
,CommandData
,AnyCommandOption
,CommandOption
,CommandSubcommandOption
,ImageFormat
ConvertedOption
now exports to indexSlashCommandOptions
now exports to index
- Some constant exports now exports to index:
Added:
- Commands will automatically acknowledge after 3 seconds to avoid interaction invalidation
- You can also set
autoAcknowledgeSource
within creator options
- You can also set
- Documentation for unknown commands
Member#pending
Fixed:
- SlashCreator documentation
- Option validation for unknown commands
- Typings are ignored for
express
andfastify
v1.2.0
Changed:
ctx.options
are a bit more consistent with sub-commands. Check the last heading in the documetation for an example.
Added:
- Support for registering/unregistering commands
- New
SlashCreator
event:commandUnregister
- New
SlashCreator
event:commandReregister
SlashCreator.reregisterCommand(command, oldCommand)
SlashCreator.unregisterCommand(command)
SlashCommand.reload()
SlashCommand.unload()
- New
- Unknown Commands
- Support for Google Cloud Functions. (
GCFServer
)
Fixed:
- Some documentation
- Command finalization
- Command throttling
- Command options validation