|
|
from telegram import Update |
|
|
from telegram.ext import Updater, CommandHandler, CallbackContext |
|
|
|
|
|
|
|
|
TOKEN = '6648024441:AAHZaX8gxrgTBG7O-1T_zKzvbl0JHKNID3Q' |
|
|
|
|
|
def hi(update: Update, context: CallbackContext) -> None: |
|
|
update.message.reply_text('Hi!') |
|
|
|
|
|
def start(update: Update, context: CallbackContext) -> None: |
|
|
update.message.reply_text('Hello! I am your bot.') |
|
|
|
|
|
|
|
|
updater = Updater(token=TOKEN, use_context=True) |
|
|
dispatcher = updater.dispatcher |
|
|
|
|
|
|
|
|
dispatcher.add_handler(CommandHandler('hi', hi)) |
|
|
dispatcher.add_handler(CommandHandler('start', start)) |
|
|
|
|
|
|
|
|
updater.start_polling() |
|
|
|
|
|
|
|
|
updater.idle() |
|
|
|