From 420fd837f6281adeaaac5dc06f2b93ade24bdd72 Mon Sep 17 00:00:00 2001 From: staticfanfare Date: Sun, 17 Dec 2023 20:55:34 -0500 Subject: [PATCH] commands now deploy globally --- deploy-commands.js | 4 ++-- example.config.json | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 example.config.json diff --git a/deploy-commands.js b/deploy-commands.js index 6ccb4a1..2051c15 100644 --- a/deploy-commands.js +++ b/deploy-commands.js @@ -1,5 +1,5 @@ const { REST, Routes } = require('discord.js'); -const { clientID, guildID, token } = require('./config.json'); +const { clientID, token } = require('./config.json'); const fs = require('node:fs'); const path = require('node:path'); @@ -34,7 +34,7 @@ const rest = new REST().setToken(token); // The put method is used to fully refresh all commands in the guild with the current set const data = await rest.put( - Routes.applicationGuildCommands(clientID, guildID), + Routes.applicationCommands(clientID), { body: commands }, ); diff --git a/example.config.json b/example.config.json new file mode 100644 index 0000000..93d4218 --- /dev/null +++ b/example.config.json @@ -0,0 +1,4 @@ +{ + "token": "BOT-TOKEN-GOES-HERE", + "clientID": "APP-ID-GOES-HERE", +}