diff options
author | Dmitrii Morozov <snoopdesigns@gmail.com> | 2024-03-21 21:08:41 +0100 |
---|---|---|
committer | Dmitrii Morozov <snoopdesigns@gmail.com> | 2024-03-21 21:08:41 +0100 |
commit | fba09f086bc7fba298bdc2b679adae559019277b (patch) | |
tree | 48e3f246a606cbcea3385dc787ba965da6aee4e4 /tgbot.py | |
parent | 9e1211c1b2d6005e529c16376d86203fa7932ed1 (diff) |
Hide token
Diffstat (limited to 'tgbot.py')
-rwxr-xr-x | tgbot.py | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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']) |