-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetCommands.js
42 lines (39 loc) · 920 Bytes
/
setCommands.js
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
import { REST, Routes } from 'discord.js';
(async () => {
try {
console.log('Updating command list');
const rest = new REST({ version: '10' }).setToken(
process.env.DISCORD_TOKEN
);
const res = await rest.put(
Routes.applicationCommands(process.env.CLIENT_ID),
{
body: [
{
description: 'Start Apex lobby',
name: 'apex'
},
{
description: 'Start Best Game lobby',
name: 'bestgame'
},
{
description: 'Start Overwatch lobby',
name: 'ow'
},
{
description: 'Start Rainbox 6 Siege lobby',
name: 'r6'
},
{
description: 'Start Valorant lobby',
name: 'valorant'
}
]
}
);
console.log(res);
} catch (err) {
console.error(err);
}
})();