summaryrefslogtreecommitdiff
path: root/tgbot.py
diff options
context:
space:
mode:
Diffstat (limited to 'tgbot.py')
-rwxr-xr-xtgbot.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/tgbot.py b/tgbot.py
index 5443d43..ccc8738 100755
--- a/tgbot.py
+++ b/tgbot.py
@@ -1,14 +1,18 @@
#!/usr/bin/python3
+
+import os
from telebot import TeleBot
-from telebot import formatting
from fortniteStatusWrapper import formatFortniteStatus
from pythonFortniteStatus.FortniteStatus import *
-bot = TeleBot('6860285100:AAFkBS_ncl38XN4_Em_nzSt93Jlwc5BJ9mU')
+if "TELEBOT_BOT_TOKEN" not in os.environ:
+ raise AssertionError("Please configure TELEBOT_BOT_TOKEN as environment variables")
+
+bot = TeleBot(os.environ["TELEBOT_BOT_TOKEN"])
fortniteStatus = FortniteStatus()
@bot.message_handler(commands = ['start'])
-def url(message):
+def startCommand(message):
bot.reply_to(message, "This bot is doing nothing so far..")
@bot.message_handler(commands = ['status'])