https://discord.gg/botpress logo
Want my bot to respond only with a key word
# 🤝help
m
I want my bot to only respond when i type a certain key word. like @bot. I have an execute code card and i have this code in there(the pic). but everytime i say hi in chat it always responds. the code does get executed and I am not sure what to do, Thank you https://cdn.discordapp.com/attachments/1367741853478289471/1367741854069555200/image.png?ex=6815b05d&is=68145edd&hm=4c6f7eb8af1af90923beb506f9034bf2beeef1bf61bde69f0a0be9e120a75ca4&
p
Have you tried using event.preview, to refer to the last user message?
l
use transition with condition event.payload.text.includes('@bot') to continue your workflow and connect the transition to the rest of your workflow, else the current node is connect to end
m
Ok I will try those and get back to you guys
Could you please tell me what cards you are talking about please?
I cant seem to find the transition card. or if there is a if else card that would be great. please advice. thank you