Skip to content

Releases: Snazzah/slash-create

v2.1.2

16 Mar 11:47
Compare
Choose a tag to compare

Changed:

  • Util.objectKeySort is now deprecated.

Fixed:

  • Syncing commands had a major bug, sorry. (#36)

v2.1.1

06 Mar 03:23
Compare
Choose a tag to compare

Changed:

  • Types for most of the command options reflect on how reliable the type property is.

Fixed:

  • Removed checking the type property within options to check for subcommand array and options. Not all clients send this type and should not be reliable.

v2.1.0

19 Feb 10:59
8e80422
Compare
Choose a tag to compare

Changed:

  • Typings for command options have the type prop
  • CommandOption is deprecated
  • CommandStringOption, CommandIntegerOption, CommandBooleanOption are in the index

Added:

  • CommandContexts now support resolved objects
    • CommandContext#members, CommandContext#users, CommandContext#roles, CommandContext#channels
    • Note: ResolvedMembers in CommandContext#members do not have mute, deaf and permissions properties.

Fixed:

  • Updated interaction data typings with the type prop

v2.0.0

11 Feb 07:28
Compare
Choose a tag to compare

Migrating from 1.x to 2.0

  • Make sure to use guildIDs instead of guildID in the command options. You can now also use an array of guild IDs to assign the same command to more guilds.
  • ctx.member and ctx.guildID is no longer guarenteed. Make sure to null-check this or use ctx.user when referencing a user.
  • If you are in a TypeScript environment, check the changes of this changelog.
  • SlashCommand#guildID is now SlashCommand#guildIDs, giving an array of strings rather than a singular one.

Changed:

  • The typings for DMInteractionRequestData and GuildInteractionRequestData is in the index.
  • The typing for InteractionRequestData is now a type rather than an interface.
  • The ping event now has a user parameter.
  • [BREAKING] CommandContext#member and CommandContext#guildID is now only given in a guild context.
  • [BREAKING] guildID in command options is now guildIDs.
  • [BREAKING] SlashCommand#guildID has been replaced with SlashCommand#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

04 Jan 22:36
Compare
Choose a tag to compare

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 into CommandSubcommandOption and AnyCommandOption, not allowing you to define options and a value.
    • Typings for User, Member and Message 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 index
    • SlashCommandOptions now exports to index

Added:

  • Commands will automatically acknowledge after 3 seconds to avoid interaction invalidation
    • You can also set autoAcknowledgeSource within creator options
  • Documentation for unknown commands
  • Member#pending

Fixed:

  • SlashCreator documentation
  • Option validation for unknown commands
  • Typings are ignored for express and fastify

v1.2.0

19 Dec 22:42
Compare
Choose a tag to compare

Changed:

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()
  • Unknown Commands
  • Support for Google Cloud Functions. (GCFServer)

Fixed:

  • Some documentation
  • Command finalization
  • Command throttling
  • Command options validation

v1.1.6

18 Dec 01:36
Compare
Choose a tag to compare

Fixed:

  • Sending options as the first argument in Context#send & Context#sendFollowUp

v1.1.5

18 Dec 01:12
Compare
Choose a tag to compare

Fixed:

  • Sending options as the first argument in Context#send

v1.1.4

17 Dec 23:59
Compare
Choose a tag to compare

Changed:

  • Added more validation for options

Added:

  • CommandContext#subcommands

Fixed:

  • Option choices validation

v1.1.3

17 Dec 22:04
Compare
Choose a tag to compare

Changed:

  • Errors in SlashCreator#startServer are no longer caught.
  • The default port is now 8030.
  • Some documentation clarifying things like tokens.

Fixed:

  • Moved typed-emitter to dependencies, fixing typings