development mode
This commit is contained in:
parent
187727fd90
commit
55ba970bb4
@ -5,6 +5,7 @@
|
|||||||
"132620781791346688",
|
"132620781791346688",
|
||||||
"132777808362471424"
|
"132777808362471424"
|
||||||
],
|
],
|
||||||
|
"developmentMode": true,
|
||||||
"clientOptions": {
|
"clientOptions": {
|
||||||
"commentedOut": ["GUILD_PRESENCES","REACTION","MESSAGE","USER"],
|
"commentedOut": ["GUILD_PRESENCES","REACTION","MESSAGE","USER"],
|
||||||
"partials": [
|
"partials": [
|
||||||
|
@ -326,6 +326,14 @@ class DiscordClient extends Client {
|
|||||||
return this.moderationManager;
|
return this.moderationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get developers() {
|
||||||
|
return this._options.discord.developers;
|
||||||
|
}
|
||||||
|
|
||||||
|
get developmentMode() {
|
||||||
|
return this._options.discord.developmentMode;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// module.exports = DiscordClient;
|
// module.exports = DiscordClient;
|
||||||
|
@ -129,6 +129,11 @@ class CommandHandler extends Observer {
|
|||||||
|
|
||||||
let response = null;
|
let response = null;
|
||||||
const now = Date.now();
|
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 {
|
try {
|
||||||
this.logger.info(`${invoker.user.tag} (${invoker.user.id}) is executing ${invoker.command.name} in ${invoker.guild?.name || 'dms'}`);
|
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);
|
response = await invoker.command.execute(invoker, options);
|
||||||
|
Loading…
Reference in New Issue
Block a user