diff --git a/src/interactions/leaderAdd.js b/src/interactions/leaderAdd.js index ed7fa4d9..068add4e 100644 --- a/src/interactions/leaderAdd.js +++ b/src/interactions/leaderAdd.js @@ -36,6 +36,9 @@ const interactionLeaderAdd = (bot, message) => { } const taggedUserID = (message.text.match(/\<@(.*)\|/) || [])[1] + if (!taggedUserID) { + throw new Error('Invalid Slack user') + } getInfoForUser(taggedUserID) .then(taggedUser => {