fix
This commit is contained in:
parent
9ea2adf2f3
commit
1975a4476d
@ -2,7 +2,6 @@ const { REST, Routes } = require('discord.js');
|
||||
const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
module.exports = (token) => {
|
||||
const guildIds = ["1230809896744779777","1068240252092813373"];
|
||||
const commands = [];
|
||||
// Grab all the command folders from the commands directory you created earlier
|
||||
const foldersPath = path.join(__dirname, 'commands');
|
||||
@ -29,14 +28,11 @@ module.exports = (token) => {
|
||||
// and deploy your commands!
|
||||
(async () => {
|
||||
try {
|
||||
// The put method is used to fully refresh all commands in the guild with the current set
|
||||
for(const guildId of guildIds){
|
||||
console.log(`Started refreshing ${commands.length} application (/) commands.`);
|
||||
const data = await rest.put(
|
||||
Routes.applicationGuildCommands(1256304109393547305n, guildId),
|
||||
{ body: commands },
|
||||
).then(data=>console.log(`Successfully reloaded ${data.length} application (/) commands.`))
|
||||
}
|
||||
console.log(`Started refreshing ${commands.length} application (/) commands.`);
|
||||
const data = await rest.put(
|
||||
Routes.applicationGuildCommands(1256304109393547305n, "1068240252092813373"),
|
||||
{ body: commands },
|
||||
).then(data=>console.log(`Successfully reloaded ${data.length} application (/) commands.`))
|
||||
} catch (error) {
|
||||
// And of course, make sure you catch and log any errors!
|
||||
console.error(error);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user