Androz2091/scratch-for-discord

Do you want to work on this issue?

You can request for a bounty in order to promote it!

How to make bot respond to message when it has a certain word #291

CallMehKing posted onGitHub

I want that for example if a member in my server said any message that includes the word "IP" the bot would reply to it no matter what else is with the word IP How Can I Do That??


I would think they should add < () Contains ()?> as a boolean.

posted by Mar10Josh about 4 years ago

I would think they should add < () Contains ()?> as a boolean.

That seems a great idea, would be really useful.

Anyways, I think there is already a way to do this.

When a message is recived, set the message text to a list with delimiter " " (1 space), and then check if the list contains "IP". This won't work if the IP part is NOT delimited by a space, so for example "testIP" won't work.

posted by 5mmx about 4 years ago

What Do You Exactly Mean By Checking The List and How Do I Do That

posted by CallMehKing about 4 years ago

Use the block that finds items in a list and look for "IP" and use a condition to check if it returns blank or not I guess.

Else you could try with a loop

posted by 5mmx about 4 years ago

u can do that but when i tried it , it kept spamming the reply over again and deleting them and again doin that

posted by BlitzioYT about 4 years ago

u can make it delete tho like automod type thing , it works for me! <img width="502" alt="Screenshot 2021-03-23 231833" src="https://user-images.githubusercontent.com/81253591/112212486-1db94f00-8c2e-11eb-9b20-2817d4c72492.png">

posted by BlitzioYT about 4 years ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests