1
Fork 0
mirror of https://github.com/Steffo99/greed.git synced 2024-11-24 14:54:18 +00:00

🐛 Fix error if the specified bot token is invalid

This commit is contained in:
Steffo 2020-12-03 07:55:29 +01:00
parent 545c4df2f3
commit d7d1ad99dd

View file

@ -88,9 +88,8 @@ def main():
# Test the specified token # Test the specified token
log.debug("Testing bot token...") log.debug("Testing bot token...")
try:
me = bot.get_me() me = bot.get_me()
except telegram.error.Unauthorized: if me is None:
logging.fatal("The token you have entered in the config file is invalid. Fix it, then restart greed.") logging.fatal("The token you have entered in the config file is invalid. Fix it, then restart greed.")
sys.exit(1) sys.exit(1)
log.debug("Bot token is valid!") log.debug("Bot token is valid!")