i kinda forgot to commit. Anyways, i made the config into toml, edited readme, and... refactored code...

This commit is contained in:
2025-06-07 13:14:50 +02:00
parent c0793562e3
commit 4c21b6da4e
20 changed files with 149 additions and 101 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ import asyncpraw as praw
import os
from typing import Final
from macros import *
import json
import toml
RE_DATA_POSTS: Final[str] = "posts"
@@ -56,7 +56,7 @@ class Bot:
return False
async def update_cfg_str(self, new_cfg: str) -> bool:
json_cfg = json.loads(new_cfg)
json_cfg = toml.loads(new_cfg)
self.sr = await self.r.subreddit(json_cfg[CFG_DATA_RE]["subreddits"])
self.fetch_limit = json_cfg[CFG_DATA_RE]["fetch_limit"]
return True