From a7518dfe5f7479205cad8ef1d1016050d456ebee Mon Sep 17 00:00:00 2001 From: Zack Campbell Date: Thu, 9 Mar 2017 16:25:10 -0600 Subject: [PATCH] Add Bot#isOwner() --- src/lib/bot/Bot.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/lib/bot/Bot.ts b/src/lib/bot/Bot.ts index c83d6dc7..d1d6da47 100644 --- a/src/lib/bot/Bot.ts +++ b/src/lib/bot/Bot.ts @@ -198,6 +198,18 @@ export class Bot extends Client if (!this.passive) this.loadCommand('all'); } + /** + * Returns whether or not the given user is an owner + * of the bot + * @memberof Bot + * @instance + * @param {User} user User to check + */ + public isOwner(user: User): boolean + { + return this.config.owner.includes(user.id); + } + /** * Loads/reloads all/specific commands * @memberof Bot