Advertisement
OtsoSilver

Untitled

Jan 23rd, 2022
818
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from telegram import Update, Bot
  2. from telegram.ext import Updater, CommandHandler, MessageHandler
  3. from credits import bot_token
  4.  
  5. bot = Bot(bot_token)
  6.  
  7. updater = Updater(bot_token, use_context=True)
  8.  
  9. dispatcher = updater.dispatcher
  10.  
  11. def start(update,context):
  12.     context.bot.send_message(update.effective_chat.id, "Привет!")
  13.  
  14. start_handler = CommandHandler('start', start)
  15. dispatcher.add_handler(start_handler)
  16.  
  17. updater.start_polling()
  18. updater.idle()
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement