mirror of
https://github.com/Steffo99/greed.git
synced 2024-11-24 06:44:19 +00:00
🐛 Fix error if the specified bot token is invalid
This commit is contained in:
parent
545c4df2f3
commit
d7d1ad99dd
1 changed files with 2 additions and 3 deletions
5
core.py
5
core.py
|
@ -88,9 +88,8 @@ def main():
|
|||
|
||||
# Test the specified token
|
||||
log.debug("Testing bot token...")
|
||||
try:
|
||||
me = bot.get_me()
|
||||
except telegram.error.Unauthorized:
|
||||
me = bot.get_me()
|
||||
if me is None:
|
||||
logging.fatal("The token you have entered in the config file is invalid. Fix it, then restart greed.")
|
||||
sys.exit(1)
|
||||
log.debug("Bot token is valid!")
|
||||
|
|
Loading…
Reference in a new issue