added devOnly mode

This commit is contained in:
Erik 2021-06-09 20:10:30 +03:00
parent 64dec0ba93
commit 9dc82d0da1
No known key found for this signature in database
GPG Key ID: 7E862371D3409F16
2 changed files with 2 additions and 1 deletions

View File

@ -38,6 +38,7 @@ class DiscordClient extends Client {
this._options = options; this._options = options;
this._built = false; this._built = false;
this._devOnly = options.devOnly;
//TODO: Default config for users and guilds. //TODO: Default config for users and guilds.
this._defaultConfig = {}; this._defaultConfig = {};

View File

@ -36,7 +36,7 @@ class CommandHandler extends Observer {
async handleMessage(message) { async handleMessage(message) {
if (!message.author.developer) return; if (!message.author.developer && this.client._devOnly) return;
if(!this.client._built if(!this.client._built
|| message.webhookID || message.webhookID
|| message.author.bot || message.author.bot