mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-12-23 09:53:18 +00:00
Update commands.js
This commit is contained in:
parent
c829f70418
commit
ebf1d0759e
@ -1,7 +1,6 @@
|
|||||||
const { SlashCommandBuilder } = require('@discordjs/builders');
|
const { SlashCommandBuilder } = require('@discordjs/builders');
|
||||||
const { REST } = require('@discordjs/rest');
|
const { REST } = require('@discordjs/rest');
|
||||||
const { Routes } = require('discord-api-types/v9');
|
const { Routes } = require('discord-api-types/v9');
|
||||||
const { token, version } = require('../config.js');
|
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require ('path');
|
const path = require ('path');
|
||||||
|
|
||||||
@ -28,13 +27,13 @@ module.exports = {
|
|||||||
commands.push(command.data);
|
commands.push(command.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
const rest = new REST({ version: '9' }).setToken(token);
|
const rest = new REST({ version: '9' }).setToken(client.config.token);
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
try {
|
try {
|
||||||
client.funcs.logger('Slash Commands', 'Started refreshing application (/) commands.');
|
client.funcs.logger('Slash Commands', 'Started refreshing application (/) commands.');
|
||||||
|
|
||||||
if(version.includes("-dev")){
|
if(client.config.devMode){
|
||||||
await rest.put(
|
await rest.put(
|
||||||
Routes.applicationCommands(client.user.id),
|
Routes.applicationCommands(client.user.id),
|
||||||
{ body: [] },
|
{ body: [] },
|
||||||
|
Loading…
Reference in New Issue
Block a user