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
GlobalCommand
xlyr.on edited this page Jan 23, 2021
·
7 revisions
new Slash.GlobalCommand({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 |
commandOne.js
const Slash = require('da-slash');
module.exports = new Slash.GlobalCommand({
name: 'hello',
description: 'sends a hello message',
permissions: ["SEND_MESSAGES"],
execute(interaction) {
interaction.sendMessage("hello");
}
})