Skip to content

Commit

Permalink
Update CheapGames.py
Browse files Browse the repository at this point in the history
  • Loading branch information
GitGinocchio committed Dec 23, 2024
1 parent 0178587 commit cc01ebb
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/commands/games/CheapGames.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit cc01ebb

Please sign in to comment.