Discord bot send wank privately?
Hello.
How can you code it so that if the bot notices a member breaking the rules, i.e. insulting someone, etc., it then sends the member a private message containing the reason and how many warnings the user has already received, so that the bot also remembers how many warnings the user has received?
I do all this in Python
You are doing an array of tuples (not very efficient, but my method) and storing it in every tuple (users, warnings).
Then you just left the messages and see if a word is contained in the message in an array of bad words, and then send the message to the person.
Then see if the user is already in the tuple:
If so, add 1 to his warnings,
If no, add it (name, 1).
Unfortunately, I can’t give you a direct code because I haven’t worked with Discord Bots for a long time. But if you have any idea, that should go.
Hope this helps!