diff options
Diffstat (limited to 'tgbot.py')
-rwxr-xr-x | tgbot.py | 19 |
1 files changed, 13 insertions, 6 deletions
@@ -1,15 +1,22 @@ #!/usr/bin/python3 -import telebot -from pythonFortniteStatus.fortnite-status import * +from telebot import TeleBot +from telebot import formatting +from fortniteStatusWrapper import formatFortniteStatus +from pythonFortniteStatus.FortniteStatus import * -bot = telebot.TeleBot('6860285100:AAFkBS_ncl38XN4_Em_nzSt93Jlwc5BJ9mU') +bot = TeleBot('6860285100:AAFkBS_ncl38XN4_Em_nzSt93Jlwc5BJ9mU') +fortniteStatus = FortniteStatus() @bot.message_handler(commands = ['start']) def url(message): bot.reply_to(message, "This bot is doing nothing so far..") -@bot.message_handler(func=lambda message: True) -def echo_message(message): - bot.reply_to(message, message.text) +@bot.message_handler(commands = ['status']) +def fortniteStatusCommand(message): + bot.send_message( + message.chat.id, + formatFortniteStatus(fortniteStatus.getStatus()), + parse_mode='MarkdownV2' + ) bot.polling(none_stop=True, interval=0)
\ No newline at end of file |