summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseth <[email protected]>2023-02-27 23:25:17 -0500
committerseth <[email protected]>2023-03-14 20:40:13 -0400
commit788a8fb3f3dc4aba8081419fd80402261aaceac8 (patch)
tree998c4cf91a24d4965ed57fd232a8a9ab284e5d5d
parent52e58d2da91d2980823612d6c55e41ed6af0382e (diff)
fail nicely when an invalid/no token is set
-rw-r--r--teawie_bot/__init__.py5
1 files changed, 4 insertions, 1 deletions
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!")