Skip to content

Commit

Permalink
Remove slash commands attempt 2
Browse files Browse the repository at this point in the history
  • Loading branch information
colehammond65 committed Jan 9, 2024
1 parent c288b0d commit ceb5f4a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ client.on('ready', (c) => {
readOnlyRoles = config.readOnlyRoleIds.map(id => server.roles.cache.find(role => role.id === id));
channel = server.channels.cache.get(config.channelID);

// for guild-based commands
rest.put(Routes.applicationGuildCommands(client_id, serverID), { body: [] })
.then(() => console.log('Successfully deleted all guild commands.'))
.catch(console.error);

// for global commands
rest.put(Routes.applicationCommands(client_id), { body: [] })
.then(() => console.log('Successfully deleted all application commands.'))
.catch(console.error);

ready = true;
})

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "echelon",
"version": "0.0.8",
"version": "0.0.9",
"description": "Next gen discord bot for streamers",
"main": "index.js",
"keywords": [],
Expand Down

0 comments on commit ceb5f4a

Please sign in to comment.