forked from Galactic/galactic-bot
development mode
This commit is contained in:
parent
187727fd90
commit
55ba970bb4
@ -5,6 +5,7 @@
|
||||
"132620781791346688",
|
||||
"132777808362471424"
|
||||
],
|
||||
"developmentMode": true,
|
||||
"clientOptions": {
|
||||
"commentedOut": ["GUILD_PRESENCES","REACTION","MESSAGE","USER"],
|
||||
"partials": [
|
||||
|
@ -326,6 +326,14 @@ class DiscordClient extends Client {
|
||||
return this.moderationManager;
|
||||
}
|
||||
|
||||
get developers() {
|
||||
return this._options.discord.developers;
|
||||
}
|
||||
|
||||
get developmentMode() {
|
||||
return this._options.discord.developmentMode;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// module.exports = DiscordClient;
|
||||
|
@ -129,6 +129,11 @@ class CommandHandler extends Observer {
|
||||
|
||||
let response = null;
|
||||
const now = Date.now();
|
||||
if (this.client.developmentMode && !this.client.developers.includes(invoker.user.id)) return invoker.reply({
|
||||
content: 'Bot is in development mode currently and is online for stability testing.\nIt\'ll be ready for public use soon!',
|
||||
ephemeral: true
|
||||
});
|
||||
|
||||
try {
|
||||
this.logger.info(`${invoker.user.tag} (${invoker.user.id}) is executing ${invoker.command.name} in ${invoker.guild?.name || 'dms'}`);
|
||||
response = await invoker.command.execute(invoker, options);
|
||||
|
Loading…
Reference in New Issue
Block a user