Enhance Twitch and Discord bot functionality by updating BOT_STATUS management. Added tracking for Twitch message timestamps and messages per minute, improved connection handling, and refined live status updates. Updated webapp to reflect new status attributes and modified Twitch moderation template for better chat message handling.

This commit is contained in:
2026-03-18 20:31:40 +01:00
parent af86ba9a8e
commit 6ef0b6856e
6 changed files with 243 additions and 94 deletions
+4
View File
@@ -84,6 +84,10 @@ class DiscordBot(discord.Client):
async def updateStatus(self):
while not self.is_closed():
bot_status = webapp.config.get("BOT_STATUS", {})
if bot_status.get("twitch_is_live") or bot_status.get("discord_streaming_activity"):
await asyncio.sleep(60)
continue
humeurs = Humeur.query.all()
if len(humeurs)>0 :
humeur = random.choice(humeurs)