I’m looking to make a command that automatically pops up when someone says a certain word or phrase? Is this possible?
@crispyjack Hm, could be possible.
!addcom -cd=5 YOUR_CERTAIN_WORD YOUR_COMMAND_RESPONSE
Ex.
!addcom -cd=5 ritik Thanks for admiring <3
Usage:
Ritik: ritik is great
Nightbot: Thanks for admiring <3
Ritik: ritik is dump developer
Nightbot: Thanks for admiring <3
Ritik: My name is Ritik
... *No response*
Also the phrase thing is not actually possible. As all the commands are trigger with first argument only.
But there is a way. Kinda
!addcom -cd=5 FIRST_WORD $(eval `$(query)`.toLowerCase()==`YOUR_REST_OF_THE_SENTENCE`.toLowerCase()?`COMMAND_RESPONSE`:` `)
Ex.
!addcom -cd=5 ritik $(eval `$(query)`.toLowerCase()==`is great`.toLowerCase()?`Thank you <3`:`No u`)
Usage
Ritik: ritik is great
Nightbot: Thank you <3
Ritik: ritik is noob
Nightbot: No u
Ritik: ritik ranjan is his full name
Nightbot: No u
Hope it helps
Regards
1 Like
I’m a little confused on how your response works? Like the Command, Ex, and usage. It looks great I’m just kinda new to this custom command stuff.
Here’s a more general format. For a phrase
!addcom First_Word_of_Phrase $(eval `$(query)`.toLowerCase()==`Rest_Of_Phrase`.toLowerCase()?`Response_If_Match`:`Response_If_Not_Match`)
If you don’t want it to say anything when it doesn’t match leave it as ` `
For a word you can just do:
!addcom Word Response
I hope that’s clear if not please explain what you don’t understand
2 Likes
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.