added /bk_week_remove command

This commit is contained in:
2025-02-13 18:21:06 +01:00
parent 2a10508534
commit 7f0a1cd476
6 changed files with 45 additions and 10 deletions
+9 -1
View File
@@ -124,4 +124,12 @@ def set_approve_post(bot: botPy.Bot, approved: bool, url: str) -> bool:
bot.data[BK_WEEKLY][url]["approved"]["by_human"] = approved
return True
return False
return False
def remove_post(bot: botPy.Bot, url: str, removed_by: str = "UNKNOWN") -> bool:
if url in bot.data[BK_WEEKLY]:
bot.data[BK_WEEKLY][url] = { "removed": True, "removed_by": removed_by }
return True
else:
return False