Skip to content

Instantly share code, notes, and snippets.

@xjxckk
xjxckk / progress.py
Last active September 23, 2024 07:38
Telegram progress updater (Python)
import telegram
from time import sleep
bot = telegram.Bot(token='token')
msg = bot.send_message(chat_id='Channel ID', text='1/10')
# msg = bot.edit_message_text(text='2/10', chat_id='Channel ID', message_id=1) # To edit an old message
# print(msg.message_id)
for x in range(10):
progress = f'{x}/10'