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:
parent
ffd2d5c365
commit
1eafab1b40
2 changed files with 12 additions and 5 deletions
12
main.py
Normal file
12
main.py
Normal 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()
|
5
mifia.py
5
mifia.py
|
@ -1,5 +0,0 @@
|
|||
import telegram
|
||||
import filemanager
|
||||
|
||||
token = filemanager.readfile('telegramapi.txt')
|
||||
bot = telegram.Bot(token)
|
Loading…
Reference in a new issue