diff --git a/lib/SlackBot.js b/lib/SlackBot.js index febf9d6b8..146d03ff9 100755 --- a/lib/SlackBot.js +++ b/lib/SlackBot.js @@ -117,7 +117,7 @@ function Slackbot(configuration) { var endpoint = '/slack/receive'; if (authenticationTokens !== undefined && arguments.length > 1 && arguments[1].length) { //botkit allows an array of tokens or multiple tokens as variable length params - var tokens = Array.prototype.slice.call(arguments).slice(1); + var tokens = Array.prototype.slice.call(arguments, 1); secureWebhookEndpoints(webserver, endpoint, tokens); }