Skip to content

Commit

Permalink
add BOT_NAME variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferdi265 committed Jul 30, 2021
1 parent fde43bb commit 3d3ce04
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bot.py
Expand Up @@ -21,6 +21,7 @@

TOKEN = os.environ.get("TMPBOT_TELEGRAM_TOKEN")
WHITELIST = os.environ.get("TMPBOT_TELEGRAM_WHITELIST", "theFerdi265").split(":")
BOT_NAME = os.environ.get("TMPBOT_BOT_NAME", "tmp.yrlf.at")
PASTE_URL = os.environ.get("TMPBOT_PASTE_URL", "https://tmp.yrlf.at")
PASTE_DIR = os.environ.get("TMPBOT_PASTE_DIR", "tmp")
GENERATE_LENGTH = int(os.environ.get("TMPBOT_GENERATE_LENGTH", "20"))
Expand Down Expand Up @@ -175,7 +176,7 @@ def handle_start(update: Update, _: CallbackContext):
logger.info(f"start message received from {name}")

message.reply_text(
"Hi! I'm the tmp.yrlf.at bot.\n" +
f"Hi! I'm the {BOT_NAME} bot.\n" +
"\n" +
"Send me stuff and I'll host it!"
)
Expand Down Expand Up @@ -323,6 +324,9 @@ def main():
if "TMPBOT_TELEGRAM_WHITELIST" not in os.environ:
logger.warning(f"no TELEGRAM_WHITELIST supplied, defaulting to {WHITELIST}")

if "TMPBOT_BOT_NAME" not in os.environ:
logger.warning(f"no TMPBOT_BOT_NAME supplied, defaulting to {BOT_NAME}")

if "TMPBOT_PASTE_URL" not in os.environ:
logger.warning(f"no TMPBOT_PASTE_URL supplied, defaulting to {PASTE_URL}")

Expand Down

0 comments on commit 3d3ce04

Please sign in to comment.