summaryrefslogtreecommitdiff
path: root/tgbot.py
diff options
context:
space:
mode:
authorDmitrii Morozov <snoopdesigns@gmail.com>2024-03-21 21:08:41 +0100
committerDmitrii Morozov <snoopdesigns@gmail.com>2024-03-21 21:08:41 +0100
commitfba09f086bc7fba298bdc2b679adae559019277b (patch)
tree48e3f246a606cbcea3385dc787ba965da6aee4e4 /tgbot.py
parent9e1211c1b2d6005e529c16376d86203fa7932ed1 (diff)
Hide token
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'])