0
def set_timer(update: Update, context: CallbackContext) -> None:
    """Add a job to the queue."""
    chat_id = update.message.chat_id
    try:
        # args[0] should contain the time for the timer in seconds
        due = int(context.args[0])
        if due < 0:
            update.message.reply_text('Sorry we can not go back to future!')
            return

        job_removed = remove_job_if_exists(str(chat_id), context)
        context.job_queue.run_once(alarm, due, context=chat_id, name=str(chat_id))

        text = 'Timer successfully set!'
        if job_removed:
            text += ' Old one was removed.'
        update.message.reply_text(text)

    except (IndexError, ValueError):
        update.message.reply_text('Usage: /set <seconds>')

How do I compile here by putting job queue run_repeated?

Yun
  • 3,056
  • 6
  • 9
  • 28
  • Hi. Welcome to SO! I don't understand what you're asking for. Please have a look at this [SO article](https://stackoverflow.com/help/how-to-ask) on how to ask good questions. Since you're asking about python-telegram-bot, please also have a look at PTBs [Ask-Right](https://github.com/python-telegram-bot/python-telegram-bot/wiki/Ask-right) wiki page. – CallMeStag Oct 10 '21 at 05:26
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Oct 15 '21 at 14:24

0 Answers0