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
GuildCommand
xlyr.on edited this page Jan 23, 2021
·
5 revisions
new Slash.GuildCommand({data});
Parameter | Type | Description | required |
---|---|---|---|
name | string | name of command | true |
description | string | description of command | true |
permissions | array<string> | required user permissions to execute command | true |
options | array<object> | options for command | false |
execute | function | function to be executed | true |
type: string
type: string
returns Promise <...command, pass>
Parameter | Type | Description | required |
---|---|---|---|
name | string | name of command | true |
returns Promise <...command, pass>
Parameter | Type | Description | required |
---|---|---|---|
user | GuildMember | a guild member | true |
returns Promise <...command, pass>
Parameter | Type | Description | required |
---|---|---|---|
interaction | Interaction | a slash interaction | true |
returns Promise <Command.id>
Parameter | Type | Description | required |
---|---|---|---|
client | Discord Client | a discord client | true |
returns Promise <Command>
Parameter | Type | Description | required |
---|---|---|---|
client | Discord Client | a discord client | true |
returns Promise <Command>
Parameter | Type | Description | required |
---|---|---|---|
client | Discord Client | a discord client | true |
commandTwo.js
const Slash = require('da-slash');
module.exports = new Slash.GuildCommand({
name: 'bye',
description: 'sends a bye message',
guilds: ["GuildIdHere"]
permissions: ["SEND_MESSAGES"],
execute(interaction) {
interaction.sendMessage("bye");
}
})