Closed cahallian closed 5 years ago
You need a break line
like so
args = args.splice(1);
switch(cmd) {
case 'turkey':
bot.sendMessage({
to: channelID,
message: ':turkey: gobble gobble cockadoodle doo'
});
break
case 'monny':
bot.sendMessage({
to: channelID,
message: '@Monathan Jchendrix where you be'
});
That took care of it. Thanks!
I used the code and got the bot to work with a single case, but it seems like now that I've added additional cases, when sending a command, the response messages for multiple cases return.
For example, see the following cases:
So what happens is when a !turkey command is sent, the bot will send multiple messages:
Botty_Boi_2: @Monathan Jchendrix where you be :turkey: gobble gobble cockadoodle doo
Any idea why a single command is calling multiple cases even when they don't apply?