This repository has been archived by the owner on Feb 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Command
xlyr.on edited this page Jan 17, 2021
·
18 revisions
new Slash.Command({data});
Parameter | Type | Description | required |
---|---|---|---|
name | string | name of command | true |
description | string | description of command | true |
permissions | array strings | required user permissions to execute command | true |
options | array objects | options for command | false |
execute | function | function to be executed | true |
guildOnly | boolean | coming soon! | true |
Parameter | Type | Description | required |
---|---|---|---|
name | string | name of command | true |
Parameter | Type | Description | required |
---|---|---|---|
user | GuildMember | a guild member | true |
Parameter | Type | Description | required |
---|---|---|---|
interaction | Slash Interaction | a slash interaction | true |
commandOne.js
module.exports = new Slash.Command({
name: 'hello',
description: 'sends a hello world message',
permissions: ["SEND_MESSAGES"],
execute(interaction) {
interaction.sendMessage("Hello World")
}
})