middleware stuff
This commit is contained in:
parent
809582841e
commit
75610342fe
@ -24,6 +24,7 @@ class SlashCommandManager {
|
||||
if(guilds.length === 0) guilds = this.client._options.discord.slashCommands.developerGuilds;
|
||||
|
||||
const promises = [];
|
||||
//console.log(JSON.stringify(commands));
|
||||
for(const guild of guilds) {
|
||||
promises.push(this.rest.put(
|
||||
Routes.applicationGuildCommands(clientId, guild),
|
||||
@ -35,7 +36,10 @@ class SlashCommandManager {
|
||||
try {
|
||||
result = await Promise.all(promises);
|
||||
} catch(error) {
|
||||
this.client.logger.write('error', `An issue has occured while updating guild commands. Guild command refresh aborted.\n${error.stack || error}`);
|
||||
this.client.logger.write(
|
||||
'error',
|
||||
`An issue has occured while updating guild commands. Guild command refresh aborted.\n${error.stack || error}`
|
||||
);
|
||||
}
|
||||
|
||||
if(!result) return null;
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
const { EventEmitter } = require('events');
|
||||
const { Collection } = require('@discordjs/collection');
|
||||
const Util = require('./../../Util.js');
|
||||
const { Util } = require('../../utilities');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user