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:
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
|
# Test the specified token
|
||||||
log.debug("Testing bot token...")
|
log.debug("Testing bot token...")
|
||||||
try:
|
me = bot.get_me()
|
||||||
me = bot.get_me()
|
if me is None:
|
||||||
except telegram.error.Unauthorized:
|
|
||||||
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!")
|
||||||
|
|
Loading…
Reference in a new issue