Attendance Target¶
-
misbot.attendance_target.
attendance_target
(bot, update)¶ Like
until_eighty()
, but with user specified target attendance percentage which is stored in theMisc
table. If target isn’t set, asks users whether they’d like to and passes control toselect_yn()
Parameters: - bot (telegram.bot.Bot) – Telegram Bot object
- update (telegram.update.Update) – Telegram Update object
Returns: SELECT_YN
Return type: int
-
misbot.attendance_target.
select_yn
(bot, update)¶ If user replies no, ends the conversation, otherwise transfers control to
input_target()
.Parameters: - bot (telegram.bot.Bot) – Telegram Bot object
- update (telegram.update.Update) – Telegram Update object
Returns: INPUT_TARGET
Return type: int
-
misbot.attendance_target.
input_target
(bot, update)¶ If the user reply is a int/float and between 1-99, stores the figure as the new attendance target.
Parameters: - bot (telegram.bot.Bot) – Telegram Bot object
- update (telegram.update.Update) – Telegram Update object
Returns: ConversationHandler.END
Return type: int
-
misbot.attendance_target.
edit_attendance_target
(bot, update)¶ Edit existing attendance target. Shows current target and transfers control to
update_target()
Parameters: - bot (telegram.bot.Bot) – Telegram Bot object
- update (telegram.update.Update) – Telegram Update object
Returns: UPDATE_TARGET
Return type: int
-
misbot.attendance_target.
update_target
(bot, update)¶ Takes the sent figure and sets it as new attendance target.
Parameters: - bot (telegram.bot.Bot) – Telegram Bot object
- update (telegram.update.Update) – Telegram Update object
Returns: ConversationHandler.END
Return type: int