From 75610342fe9a611c9d6927d48c8f0773a518d47a Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Sat, 26 Mar 2022 22:08:27 +0200 Subject: [PATCH] middleware stuff --- src/middleware/rest/SlashCommandManager.js | 6 +++++- src/middleware/shard/ShardingManager.js | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/middleware/rest/SlashCommandManager.js b/src/middleware/rest/SlashCommandManager.js index 5289b13..3f48620 100644 --- a/src/middleware/rest/SlashCommandManager.js +++ b/src/middleware/rest/SlashCommandManager.js @@ -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; diff --git a/src/middleware/shard/ShardingManager.js b/src/middleware/shard/ShardingManager.js index a4ba79d..fc5e178 100644 --- a/src/middleware/shard/ShardingManager.js +++ b/src/middleware/shard/ShardingManager.js @@ -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');