Updating from v7 to v8

For starters, discord.js v12 support has been removed

GCommandsOptions

loader

The command loading options for GCommands. Docsopen in new window 📙

cmdDir & eventDir

cmdDir & eventDir have been moved to a place in loader.

new GCommandsClient({
  loader: {
    cmdDir: ...,
    eventDir: ...,
  }
})
1
2
3
4
5
6

commands

The command related options for GCommands. Docsopen in new window 📙

caseSensitivePrefixes & caseSensitiveCommands

caseSensitivePrefixes & caseSensitiveCommands have been moved to a place in commands.

new GCommandsClient({
  commands: {
    caseSensitivePrefixes: ...,
    caseSensitiveCommands: ...,
  }
})
1
2
3
4
5
6

allowDm

Support for DMs has been added.

new GCommandsClient({
  commands: {
    allowDm: true,
  }
})
1
2
3
4
5

arguments

Docsopen in new window 📙

deleteInput & deletePrompt

Added support for deleting prompts and input


Command

Docsopen in new window 📙

args

Arguments are no longer arrays, they are now CommandInteractionOptionResolveropen in new window instead.

arrayArgs

Since arguments are no longer arrays, you can now use arrayArgs to get them with an array.

objectArgs

Since arguments are no longer arrays, you can now use objectArgs to get them with an object.

respond & edit & followUp

MessageOptions (also for Interactions) are now GPayloadOptionsopen in new window 📙 in GCommands. You can use respond() like in discord.js v12open in new window (similar to the second and third example).


GComponents

A new component handler for GCommands: GComponents!

new GCommandsClient({
  loader: {
    componentDir: ...
  }
})
1
2
3
4
5

GComponents docsopen in new window 📘