Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions features/tourney/tourney_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -2815,11 +2815,23 @@ async def refresh_sticky_redirect(
)

if is_sa_tourney:
description = f"# ⚠️ ¡Atención!\n# Por favor, usa {support_mention} para abrir un ticket de soporte para el torneo."
embeds = [
discord.Embed(
description=f"# ⚠️ ¡Atención!\n# Por favor, usa {support_mention} para abrir un ticket de soporte para el torneo.",
color=discord.Color.red(),
),
discord.Embed(
description=f"# ⚠️ Atenção!\n# Por favor, use {support_mention} para abrir um ticket de suporte para o torneio.",
color=discord.Color.red(),
),
]
else:
description = f"# ⚠️ Attention!\n# Please use {support_mention} to open a support ticket for the tournament."

embed = discord.Embed(description=description, color=discord.Color.red())
embeds = [
discord.Embed(
description=f"# ⚠️ Attention!\n# Please use {support_mention} to open a support ticket for the tournament.",
color=discord.Color.red(),
)
]

# Try deleting the previously tracked sticky message first.
old_msg_id = sticky_redirect_message_ids.get(channel.id)
Expand All @@ -2834,13 +2846,13 @@ async def refresh_sticky_redirect(
async for msg in channel.history(limit=30):
if msg.author != bot.user or not msg.embeds:
continue
if msg.embeds[0].description == embed.description:
if msg.embeds[0].description == embeds[0].description:
try:
await msg.delete()
except (discord.NotFound, discord.Forbidden):
pass

new_msg = await channel.send(embed=embed)
new_msg = await channel.send(embeds=embeds)
sticky_redirect_message_ids[channel.id] = new_msg.id

@bot.listen()
Expand Down
Loading