F
F
Flummox_lnc2021-01-14 21:18:59
Node.js
Flummox_lnc, 2021-01-14 21:18:59

How to auto-ban violators from a discord bot?

When creating the bot, I needed the bot to automatically ban the participants (or kick/mute) if there is a mate in their messages. I have an example algorithm, but I don't know how to implement it.
1) The bot has a variable that contains all forbidden words.
2) When a message arrives in the channel, the bot checks it.
Then it:
a) Issues a ban to the author of the message if it contains forbidden words from the variable. (It is desirable that the bot indicate the
reason when issuing a ban).
b) return is fired; if there are no forbidden words in the message.
Please tell me how to implement auto-bans.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question