From 788a8fb3f3dc4aba8081419fd80402261aaceac8 Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 27 Feb 2023 23:25:17 -0500 Subject: fail nicely when an invalid/no token is set --- teawie_bot/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/teawie_bot/__init__.py b/teawie_bot/__init__.py index e3b5d8f..edb1c52 100644 --- a/teawie_bot/__init__.py +++ b/teawie_bot/__init__.py @@ -6,4 +6,7 @@ TOKEN = os.getenv("TOKEN") def main(): - bot.run(TOKEN) + try: + bot.run(TOKEN) + except TypeError: + print("invalid/no token!") -- cgit v1.2.3