Skip to content

Commit

Permalink
Add Bot#isOwner()
Browse files Browse the repository at this point in the history
  • Loading branch information
zajrik committed Mar 9, 2017
1 parent e09431d commit a7518df
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/lib/bot/Bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a7518df

Please sign in to comment.