Reputation: 682
I am trying to develop a slack bot using slack botkit and i have a problem while trying to handle slash commands. I am using the following syntax that i took from the support slack of the slack botkit.
controller.hears('/tempo', 'slash_command', async (bot,message)=>{
console.log("here")
})
it doesn't work using this syntax, but on the other hand the command generated from the scaffold works.
controller.on('slash_command',async (bot, message) => {
console.log(message.command.split('/')[1])
})
What am i missing here ?
Upvotes: 1
Views: 99