# CommandResolvable
KEY | TYPE | DESCRIPTION | OPTIONAL | DEFAULT |
---|---|---|---|---|
command | String (opens new window) | The name of the commands | ⨯ | none |
description | String (opens new window) | The description of the command. | ✓ | "Developer didn't specify the description of the command." |
blockedChannels | Array (opens new window) | The channels where this command cannot be executed. | ✓ | [ ] |
blockedUsers | Array (opens new window) | The users cannot execute this command. | ✓ | [ ] |
blockedRoles | Array (opens new window) | The users who has these roles cannot execute this command. | ✓ | [ ] |
channels | Array (opens new window) | The channels where this command can only be executed. | ✓ | [ ] |
users | Array (opens new window) | The users who can only execute this command. | ✓ | [ ] |
roles | Array (opens new window) | The users who has these roles can only execute this command. | ✓ | [ ] |
permissions | Array (opens new window) | The users who has these permissions can only execute this command. | ✓ | [ ] |
guilds | Array (opens new window) | The guilds where this command can only be executed.. | ✓ | [ ] |
data | JSON (opens new window) | The data for the slash command. | ✓ | { } |
preExecute | Async Function (opens new window) | Executes before the command is executed. | ✓ | empty |
Execute | Async Function (opens new window) | Executes after preExecute or the main Execution of the command. | ✓ | empty |
postExecute | Async Function (opens new window) | Executes after the command is executed ( after Execute ). | ✓ | empty |
preSlashExecute | Async Function (opens new window) | Executes before the slash command is executed. | ✓ | empty |
slashExecute | Async Function (opens new window) | Executes after preExecute or the main Execution of the slash command. | ✓ | empty |
postSlashExecute | Async Function (opens new window) | Executes after the slash command is executed ( after Execute ). | ✓ | empty |
# Output
module.exports = {
command: 'Command',
description: 'Description of the command.',
blockedChannels: [ < Snowflake > ],
blockedUsers: [ < Snowflake > ],
blockedRoles: [ < Snowflake > ],
channels: [ < Snowflake > ],
users: [ < Snowflake > ],
roles: [ < Snowflake > ],
permissions: [ < Permission Bits > ],
guilds: [ < Snowflake > ],
data: { < Slash Command JSON > },
async preExecute ( message , arguments ) {
/*
You may put your code to be executed
when before the main Execution is fired.
*/
},
async Execute ( message , arguments ) {
/*
You may put your code to be executed
when the command is fired.
*/
},
async postExecute ( message , arguments ) {
/*
You may put your code to be executed
after the command is fired.
*/
},
async preSlashExecute ( message , arguments ) {
/*
You may put your code to be executed
when before the main Execution is fired.
*/
},
async slashExecute ( message , arguments ) {
/*
You may put your code to be executed
when the slash command is fired.
*/
},
async postSlashExecute ( message , arguments ) {
/*
You may put your code to be executed
after the slash command is fired.
*/
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59