delay updating slash commands
This commit is contained in:
2 files changed
+8
-2
No files matched your search
+1
-1
@@ -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(`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.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();
|
||||||
};
|
};
|
||||||
@@ -218,8 +218,14 @@ class LinesPoliceCadBot extends Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
RegisterSlashCommands() {
|
RegisterSlashCommands() {
|
||||||
|
let p = Promise.resolve()
|
||||||
this.guilds.cache.forEach((guild) => {
|
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);
|
||||||
|
})
|
||||||
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user