From b81c0657b7a37757019bfa2671dd819677548c9f Mon Sep 17 00:00:00 2001 From: nsde Date: Sat, 19 Aug 2023 13:31:37 +0200 Subject: [PATCH] Fixed credit system. --- rewards/main.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rewards/main.py b/rewards/main.py index 0412549..6a04aaa 100644 --- a/rewards/main.py +++ b/rewards/main.py @@ -11,8 +11,6 @@ from dotenv import load_dotenv load_dotenv() async def main(): - mongo = pymongo.MongoClient(os.getenv('MONGO_URI')) - await update_roles() await autocredits.update_credits(roles) @@ -52,7 +50,7 @@ async def update_roles(): def launch(): asyncio.run(main()) - with open('rewards/last_update.txt', 'w') as f: + with open('rewards/last_update.txt', 'w', encoding='utf8') as f: f.write(str(time.time())) if __name__ == '__main__':