-
Notifications
You must be signed in to change notification settings - Fork 0
List, Cancel and Close Handlers
Miguel Tenorio edited this page Nov 10, 2020
·
1 revision
The /list
group command shows the names of the users who has voted.
/cancel
has a private and a group handler.
As is stated in the config wiki, the use of /cancel
stop the discussion's configuration process.
Using /cancel
in a group as an administrator cancels the current discussion if there is one, deleting all the data related to it.
This handler gets the votes of the users who voted in the current discussion, selects the current model, and sends the result of processing the votes using the model to the group. Let's get into the details:
- Line 19 gets the votes:
votes = [v for v in context.chat_data['voters'].values() if v]
- Line 20 selects the current model:
model = context.chat_data.get('model')
- Line 21 get the result of processing the votes using the model.
solution = use_model(votes, model)
This handler also delete all the data related to the discussion once the result is send.
Wiki of Matcom Scheduler © Copyright 2019-2020 – Licensed by 2kodevs