Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TelegramBot.py:
- from time import sleep
- import sys
- import telegram
- from telegram.ext import Updater, CommandHandler, MessageHandler, Filters
- tokenString = ''
- class TelegramBot(object):
- def __init__(self):
- self.s = Updater(token=tokenString)
- def start(update, context):
- update.message.reply_text('Hi!')
- main file:
- import TelegramBot
- bot = TelegramBot()
- dp = bot.dispatcher
- dp.add_handler(CommandHandler("start", bot.start))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement