diff --git a/events/ready.js b/events/ready.js index cd7f75b..d571889 100644 --- a/events/ready.js +++ b/events/ready.js @@ -6,5 +6,5 @@ module.exports = async (client) => { ) client.log(`Successfully Logged in as ${client.user.tag}`); // You can change the text if you want, but DO NOT REMOVE "client.user.tag" client.log(`Ready to serve in ${client.channels.cache.size} channels on ${client.guilds.cache.size} servers, for a total of ${client.users.cache.size} users.`) - // client.RegisterSlashCommands(); -}; \ No newline at end of file + client.RegisterSlashCommands(); +}; diff --git a/structures/LinesPoliceCadBot.js b/structures/LinesPoliceCadBot.js index 3c7bddb..34a1494 100644 --- a/structures/LinesPoliceCadBot.js +++ b/structures/LinesPoliceCadBot.js @@ -218,8 +218,14 @@ class LinesPoliceCadBot extends Client { } RegisterSlashCommands() { + let p = Promise.resolve() this.guilds.cache.forEach((guild) => { - require("../util/RegisterSlashCommands")(this, guild.id); + p = promise.then(() => { + require("../util/RegisterSlashCommands")(this, guild.id); + return new Promise((resolve) => { + setTimeout(resolve, 1000); + }) + }) }); }