diff --git a/README.md b/README.md index 13fe480..2fba637 100644 --- a/README.md +++ b/README.md @@ -181,7 +181,7 @@ Users will be able to add credit to their wallet, place orders and contact you i ## Documentation and help -If you find a bug, have an idea for a new feature or just require help with `greed`, please [post an issue](https://github.com/Steffo99/greed/issues/new) on GitHub, or, if GitHub is blocked in your country, join [the Telegram group](https://t.me/greed_project) and send a message there. +If you find a bug, have an idea for a new feature or just require help with `greed`, please [post an issue](https://github.com/Steffo99/greed/issues/new) or [open a discussion](https://github.com/Steffo99/greed/discussions/new) on GitHub, or, if GitHub is blocked in your country, send me an email at [ste.pigozzi@gmail.com](mailto:ste.pigozzi@gmail.com)! If you can read Italian, you can try to read the [paper](https://docs.google.com/document/d/1f4MKVr0B7RSQfWTSa_6ZO0LM4nPpky_GX_qdls3EHtQ/edit?usp=sharing) I wrote about greed for my final High School exam. diff --git a/core.py b/core.py index 981b9cc..ecacbcd 100644 --- a/core.py +++ b/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!") diff --git a/worker.py b/worker.py index 6d7f483..524d9ef 100644 --- a/worker.py +++ b/worker.py @@ -1814,6 +1814,6 @@ class Worker(threading.Thread): # If a restart has been requested... # Do nothing. # Close the database session - self.session.close(); + self.session.close() # End the process sys.exit(0) \ No newline at end of file