Answer the question
In order to leave comments, you need to log in
How can I send a unique timer to all users?
count2 = 0
@dp.message_handler(commands=['list'], state=botst.await_four)
async def questions2(message: Message):
global count2
for id_users in user_id:
await bot.send_photo(chat_id=id_users, photo=open('/home/asus/Desktop/kahoot_bot/img_kahoot.py/2img.webp', 'rb'))
await bot.send_message(chat_id=id_users, text='Python это змея?\n False\n True', reply_markup=buttons.Quest().quest2())
timer_start_message = await bot.send_message(chat_id=id_users, text='У тебя 10 секунд на ответ . . . ')
for time in range(9, 0, -1):
count2 += 1
await asyncio.sleep(1)
await bot.edit_message_text(chat_id=id_users, message_id=timer_start_message.message_id, text=f'{time}')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question