delay updating slash commands

This commit is contained in:
SowinskiBraeden committed 2023-02-01 16:56:24 -08:00
1 parent a653b8d394
commit abc078eab8
2 files changed
+7 -1

No files matched your search

+1 -1
View File
@@ -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();
client.RegisterSlashCommands();
};
+6
View File
@@ -218,8 +218,14 @@ class LinesPoliceCadBot extends Client {
}
RegisterSlashCommands() {
let p = Promise.resolve()
this.guilds.cache.forEach((guild) => {
p = promise.then(() => {
require("../util/RegisterSlashCommands")(this, guild.id);
return new Promise((resolve) => {
setTimeout(resolve, 1000);
})
})
});
}