I’m writing a bot in python and aiogram. The point is that the administrator accepts (or rejects) user requests. Accordingly, when the administrator clicks on the button in his chat, I need to change the user’s state (his uid is known). I didn’t find how to do it anywhere.
I’m looking for something like
dp.set_state(uid, User.accepted))
Thanks!
2
Answers
I had the same problem
Found method set() in base class State:
So I created new class from State and overrode method this way:
Usage:
If you want some mailing stuff, collect user ids and use that hint.
then
set_state()
andset_data()
on thenew_state
.storage
is the FSM storage.