1
Fork 0
mirror of https://github.com/RYGhub/royal-mifia.git synced 2024-11-25 15:14:18 +00:00

Aggiunto comando ping al bot per testare il funzionamento

This commit is contained in:
Steffo 2016-04-21 18:57:23 +02:00
parent ffd2d5c365
commit 1eafab1b40
2 changed files with 12 additions and 5 deletions

12
main.py Normal file
View file

@ -0,0 +1,12 @@
from telegram.ext import Updater
import filemanager
token = filemanager.readfile('telegramapi.txt')
updater = Updater(token)
def ping(bot, update):
bot.sendMessage(update.message.chat.id, "Pong!")
updater.dispatcher.addTelegramCommandHandler('ping', ping)
updater.start_polling()

View file

@ -1,5 +0,0 @@
import telegram
import filemanager
token = filemanager.readfile('telegramapi.txt')
bot = telegram.Bot(token)