From a20889dc5d0f7415a0c3ce04a595cce73805c03b Mon Sep 17 00:00:00 2001 From: Santiago Valenzuela Date: Sat, 28 Nov 2020 17:46:12 -0600 Subject: [PATCH 1/4] Fix typo (#84) Co-authored-by: Santiago Valenzuela --- database.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database.py b/database.py index 4264366..cbc9457 100644 --- a/database.py +++ b/database.py @@ -190,7 +190,7 @@ class Transaction(DeferredReflection, TableDeclarativeBase): def text(self, w: "worker.Worker"): string = f"T{self.transaction_id} | {str(self.user)} | {w.Price(self.value)}" if self.refunded: - string += f" | {w.loc['emoji_refunded']}" + string += f" | {w.loc.get('emoji_refunded')}" if self.provider: string += f" | {self.provider}" if self.notes: From d7d1ad99dd9e15f4cf530aacf658db85a152d678 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 3 Dec 2020 07:55:29 +0100 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=90=9B=20Fix=20error=20if=20the=20spe?= =?UTF-8?q?cified=20bot=20token=20is=20invalid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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!") From 3915bb74476223c787188afbd781f7e113434199 Mon Sep 17 00:00:00 2001 From: Santiago Valenzuela Date: Thu, 3 Dec 2020 08:11:58 +0100 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=90=9B=20Fix=20worker=20not=20closing?= =?UTF-8?q?=20sessions=20properly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worker.py | 1 + 1 file changed, 1 insertion(+) diff --git a/worker.py b/worker.py index 042d23c..4228fee 100644 --- a/worker.py +++ b/worker.py @@ -1535,5 +1535,6 @@ class Worker(threading.Thread): # If a restart has been requested... # Do nothing. # Close the database session + self.session.close() # End the process sys.exit(0) From e2bb95fcac18a6d20f5dd60ac8a824bac98a5e66 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 9 Dec 2020 01:59:28 +0100 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=97=92=20Replace=20Telegram=20group?= =?UTF-8?q?=20with=20GitHub=20Discussions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.