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
+9 -3

No files matched your search

+7 -1
View File
@@ -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);
})
})
});
}