From ebf1d0759ef359311fa772647296a2fdb50915c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Thu, 16 Sep 2021 02:52:40 +0300 Subject: [PATCH] Update commands.js --- src/client/commands.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/client/commands.js b/src/client/commands.js index 9641933..36e691e 100644 --- a/src/client/commands.js +++ b/src/client/commands.js @@ -1,7 +1,6 @@ const { SlashCommandBuilder } = require('@discordjs/builders'); const { REST } = require('@discordjs/rest'); const { Routes } = require('discord-api-types/v9'); -const { token, version } = require('../config.js'); const fs = require('fs'); const path = require ('path'); @@ -28,13 +27,13 @@ module.exports = { commands.push(command.data); } - const rest = new REST({ version: '9' }).setToken(token); + const rest = new REST({ version: '9' }).setToken(client.config.token); (async () => { try { client.funcs.logger('Slash Commands', 'Started refreshing application (/) commands.'); - if(version.includes("-dev")){ + if(client.config.devMode){ await rest.put( Routes.applicationCommands(client.user.id), { body: [] },