middleware stuff

This commit is contained in:
Erik 2022-03-26 22:08:27 +02:00
parent 809582841e
commit 75610342fe
Signed by untrusted user: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB
2 changed files with 6 additions and 2 deletions

View File

@ -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;

View File

@ -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');