On receiving polls, reply to it by a closed poll copying the received poll
(update: Update, context: ContextTypes.DEFAULT_TYPE)
| 138 | |
| 139 | |
| 140 | async def receive_poll(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: |
| 141 | """On receiving polls, reply to it by a closed poll copying the received poll""" |
| 142 | actual_poll = update.effective_message.poll |
| 143 | # Only need to set the question and options, since all other parameters don't matter for |
| 144 | # a closed poll |
| 145 | await update.effective_message.reply_poll( |
| 146 | question=actual_poll.question, |
| 147 | options=[o.text for o in actual_poll.options], |
| 148 | # with is_closed true, the poll/quiz is immediately closed |
| 149 | is_closed=True, |
| 150 | reply_markup=ReplyKeyboardRemove(), |
| 151 | ) |
| 152 | |
| 153 | |
| 154 | async def help_handler(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…