Slash_Commands.js documentation
I made this in 30 minutes.
new slashCommand(client: Client)
Creates a global slash command that is cached for 1 hour.
new guildSlashCommand(client: Client)
Creates a guild specific slash command that refreshes instantly.
new slashOption()
Creates a option for a slash command.
new slashOptionChoice()
Creates a choice for a slash option.
onCommandExecute(callback: slashInteraction)
Fires the callback when a slash command gets executed. Returns the slash interaction with the command, choices, options etc.
slashInteraction
Gets returned from the onCommandExecute event.
content: String
id: Number
command_id: Number
options: Object
channel: Discord Channel
guild: Discord Guild
author: Discord User
member: Guild Member
application_id: Number
interaction: Interaction
client: Client
reply(string | embed | replyObject) : slashResponse | Method
Reply to a slash command.
defer() : boolean | Method
If you know the response is taking longer than 3 seconds, you can let the bot think, until you do reply().
slashResponse
Gets returned from the slashInteraction.reply() method.
content: String
command_id: Number
options: Object
channel: Discord Channel
guild: Discord Guild
author: Discord User
member: Guild Member
application_id: Number
interaction: Interaction
client: Client
embeds: Embeds Object
components: Components Object
ephemeral: boolean
reply(replyObject) : slashResponse | Method
Reply with a slashResponse to the slashResponse
edit(replyObject) : slashResponse | Method
Edit a slashResponse
delete() : boolean | Method
Delete a slashResponse
replyObject
Argument for the slashResponse for editing or replying.
content: String
embeds: Object
components: Object
ephemeral: boolean
Some examples if you dont understand the rest.
If you read this you gay lol