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•3y ago
Message Not Public
Sign In & Join Server To View
listen to the messageCreate event and check the message content
and then send a message with a select menu (dropdown)
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.I will I was just curious what is the "better" way? I've heard regex but I've never looked into it.
🤔
Alright, good to know. Thank you