Real96

Untitled

Oct 18th, 2020 (edited)
668
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. TelegramBot.py:
  2.  
  3. from time import sleep
  4. import sys
  5. import telegram
  6. from telegram.ext import Updater, CommandHandler, MessageHandler, Filters
  7.  
  8.  
  9. tokenString = ''
  10.  
  11. class TelegramBot(object):
  12.     def __init__(self):
  13.         self.s = Updater(token=tokenString)
  14.  
  15.     def start(update, context):
  16.         update.message.reply_text('Hi!')
  17.        
  18.  
  19. main file:
  20.  
  21. import TelegramBot
  22.  
  23. bot = TelegramBot()
  24. dp = bot.dispatcher
  25. dp.add_handler(CommandHandler("start", bot.start))
RAW Paste Data