-2

I'm using application library not updater and I'm stuck in this problem i have read documentation but haven't find any answers for example the user command /donte_code then wants to insert some data bot when i catch the text it includes /donate_code not other things that the user has written

from telegram.ext import Application, CommandHandler, MessageHandler, filters, ContextTypes

from telegram import Update, ReplyKeyboardMarkup
async def donate_code(update :Update, context: ContextTypes.DEFAULT_TYPE):
    await update.message.reply_text("Please enter your code")
    value=update.message.text

async def error(update: Update, context: ContextTypes.DEFAULT_TYPE):
    print(f'Update {update} caused error {context.error}')

if __name__ == '__main__':
    app = Application.builder().token(TOKEN).build()

    app.add_handler(CommandHandler("Donate_code", donate_code))

    # Log all errors
    app.add_error_handler(error)

    # Run the bot
    app.run_polling(poll_interval=5)

what do I have to do after this??

Darknight
  • 1
  • 1

0 Answers0