Skip to content

Commit

Permalink
Make sure we get a user in whois command
Browse files Browse the repository at this point in the history
This resolves #18.
  • Loading branch information
Nabrok committed Apr 20, 2017
1 parent b0cf95d commit 3177953
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions features/whois.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ function messageReceived(message) {
if (message.content.match(new RegExp(`^!${phrases.get("WHOIS_WHOIS")} (.*)?$`, "i"))) {
if (message.mentions.users.length === 0) return; // No mentions? No answer
const user = message.mentions.users.first();
if (! user) return;
channel.startTyping();
var p;
if (user.id === bot_user.id) p = message.reply(phrases.get("WHOIS_BOT", { user: bot_user }));
Expand Down

0 comments on commit 3177953

Please sign in to comment.