forgor to commit again. I made the approve button work as intended, refactored code, and added more language support

This commit is contained in:
2025-06-08 14:02:28 +02:00
parent f0e3ab5e8f
commit 5acdebbb3d
10 changed files with 99 additions and 65 deletions
+4 -4
View File
@@ -45,8 +45,6 @@ async def add_new_posts(bot: botPy.Bot, max_age: int) -> bool:
if not media[0]:
without_media += 1
continue
post_added = False
post_added = data.add_post_to_data(
bot,
@@ -57,11 +55,13 @@ async def add_new_posts(bot: botPy.Bot, max_age: int) -> bool:
else: not_added += 1
py_print(f"Successfully fetched {len(posts)} posts.\n" +
f" Out of which were {added_posts} added.\n" +
f" {without_media} had no media, " +
f" Out of which were {added_posts} added.\n" +
f" {without_media} had no media, " +
f"{not_added} are removed or already existed, " +
f"and {old_posts} were older than the max age threshold.")
data.write_data(bot)
return True