-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdelete-commands.js
More file actions
32 lines (26 loc) · 1008 Bytes
/
delete-commands.js
File metadata and controls
32 lines (26 loc) · 1008 Bytes
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
const { REST, Routes } = require('discord.js');
const { clientId, token } = require('./config.json');
const rest = new REST().setToken(token);
// remove
(async () => {
try {
await
rest.put(Routes.applicationCommands(clientId), { body: [] });
console.log('Successfully deleted all application commands.');
} catch (error) {
console.error(error);
}
})();
// guild based commands
// const { clientId, guildId, token } = require('./config.json');
// rest
// .put(Routes.applicationGuildCommands(clientId, guildId), { body: [] })
// .then(() => console.log('Successfully deleted all guild commands.'))
// .catch(console.error);
// global commands
// const { clientId, token } = require('./config.json');
// rest
// .put(Routes.applicationCommands(clientId), { body: [] })
// .then(() => console.log('Successfully deleted all application commands.'))
// .catch(console.error);
// 길드 명령어와 글로벌 명령어는 별개임