Answer the question
In order to leave comments, you need to log in
How to Implement User Mut?
My bot moderates the conversation, and when the command! Mut *time* should muddle the user for the period specified in the command, I know how to implement the mut itself, but I can’t guess how to implement it for a certain period, and is it possible without using the database?
Answer the question
In order to leave comments, you need to log in
Depends on how you generally make a bot. Do you have conversation user entities? If there is, then we just add another variable with the date of removal of the mut and a flag (optional). If there is no entity, then just create a dictionary (user id, time per mut). After each message, we check the date if the user is in the dictionary. There are hundreds of ways to do it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question