From cc01ebbad3b9cd2805a137d62d0e53fe12d03f97 Mon Sep 17 00:00:00 2001 From: GitGinocchio Date: Mon, 23 Dec 2024 04:54:16 +0100 Subject: [PATCH] Update CheapGames.py --- src/commands/games/CheapGames.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/commands/games/CheapGames.py b/src/commands/games/CheapGames.py index 2b536de..3e6569d 100644 --- a/src/commands/games/CheapGames.py +++ b/src/commands/games/CheapGames.py @@ -369,7 +369,6 @@ async def send_giveaway_update(self, guild_id : int, update_config : dict): saved_giveaways[str(game["id"])] = game["published_date"] - messages = [] for channel in giveaway_channels: if (channel:=self.bot.get_channel(channel)) is None: continue @@ -379,15 +378,11 @@ async def send_giveaway_update(self, guild_id : int, update_config : dict): message = await channel.send(embed=ui, view=ui) if message.channel.is_news(): - messages.append(message) - - for message in messages: - try: - pass - #await message.publish() - except Exception as e: - logger.exception(e) - print(e) + try: + await message.publish() + except Exception as e: + logger.exception(e) + print(e) if n_send >= 10: # Send only 10 games at a tine break