Advertisement
Real96

Untitled

Oct 18th, 2020 (edited)
1,877
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  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))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement