May-28-2020, 11:55 PM
Dear All,
Excuse me if my post is in not proper forum.
I am trying bot library from telegram.ext.
Used the same code from python telegram bot. The echo function is working as expected. But the caps function is not producing capital text . Could throw some light.
Excuse me if my post is in not proper forum.
I am trying bot library from telegram.ext.
Used the same code from python telegram bot. The echo function is working as expected. But the caps function is not producing capital text . Could throw some light.
def echo(update, context): context.bot.send_message(chat_id=update.effective_chat.id, text=update.message.text) from telegram.ext import MessageHandler, Filters echo_handler = MessageHandler(Filters.text & (~Filters.command), echo) dispatcher.add_handler(echo_handler) def caps(update, context): text_caps = ' '.join(context.args).upper() context.bot.send_message(chat_id=update.effective_chat.id, text=text_caps) caps_handler = CommandHandler('caps', caps) dispatcher.add_handler(caps_handler)