How does a bot do this?

It is a drop down that says "yes" or "no" that automatically comes up when you say thank you in the channel. I pressed "yes" obv and it did it automatically. Are there tutorials on this or something I can follow onthe DJS guide?
7 Replies
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Idris
Idris•3y ago
listen to the messageCreate event and check the message content and then send a message with a select menu (dropdown)
Erin
ErinOP•3y ago
Alright. To listen to the messageCreate event, do I need to use regex to make sure I get any version of thanks ? Does this mean simply doing if(message == 'thanks' and all the variations should work? I was using pseudocode. I was just asking if the gist of this works. Basically if I had the right idea I've never used regex. It looks confusing to me. lol I was just going to use ORs so if(message.content === 'thanks' || message.content === 'thank you' ... Will using ORs work, like above? No, I haven't had a chance. I'm really just trying to gather mental notes.
MrMythical
MrMythical•3y ago
meguFace
Erin
ErinOP•3y ago
I will I was just curious what is the "better" way? I've heard regex but I've never looked into it.
MrMythical
MrMythical•3y ago
🤔
Erin
ErinOP•3y ago
Alright, good to know. Thank you
Want results from more Discord servers?
Add your server