skip to Main Content

How to store user data and display them according to their corresponding callbacks – Telegram API

Here's my code: from telegram import * from telegram.ext import * import telegram, telegram.ext u = Updater('TOKEN', use_context=True) j=u.job_queue def set(update: Update, context: CallbackContext): user_says=' '.join(context.args) user_says=user_says.split(' ') global item, chat_id item=user_says[1:] chat_id=update.effective_chat.id j.run_once(callback, int(user_says[0])) def callback(context: telegram.ext.CallbackContext): context.bot.send_message(chat_id=chat_id, text=f'Great…

VIEW QUESTION
Back To Top
Search