Update gauntlets.py
Remove and post new message per round to avoid webhook timeouts
This commit is contained in:
parent
f1f9b9676a
commit
5850672e05
17
gauntlets.py
17
gauntlets.py
@ -185,7 +185,10 @@ async def run_draft(interaction: discord.Interaction, main_team, this_event, dra
|
||||
counter = 0
|
||||
|
||||
view = helpers.Confirm([interaction.user])
|
||||
view.confirm.label = 'Let\'s Go!'
|
||||
if this_event['id'] == 1:
|
||||
view.confirm.label = 'Let\'s a-Go!'
|
||||
else:
|
||||
view.confirm.label = 'Let\'s Go!'
|
||||
|
||||
intro_embed = get_embed(this_event=this_event)
|
||||
intro_embed.title += ' - Are you ready?'
|
||||
@ -260,11 +263,7 @@ async def run_draft(interaction: discord.Interaction, main_team, this_event, dra
|
||||
|
||||
return [top_embed, bot_embed]
|
||||
|
||||
await interaction.edit_original_response(
|
||||
content=None,
|
||||
embeds=get_embeds(),
|
||||
view=None
|
||||
)
|
||||
last_message = await interaction.channel.send(content=None, embeds=get_embeds(include_links=False))
|
||||
|
||||
if this_event['id'] == 1:
|
||||
mario_round = None
|
||||
@ -402,10 +401,8 @@ async def run_draft(interaction: discord.Interaction, main_team, this_event, dra
|
||||
counts[x] += 1
|
||||
|
||||
# Update roster embed
|
||||
await interaction.edit_original_response(
|
||||
content=None,
|
||||
embeds=get_embeds(include_links=False)
|
||||
)
|
||||
await last_message.delete()
|
||||
last_message = await interaction.channel.send(content=None, embeds=get_embeds(include_links=False))
|
||||
round_num += 1
|
||||
else:
|
||||
logging.error(f'run_draft - No draft logic for Event ID {this_event["id"]}')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user