Skip to content

Commit

Permalink
[BattleRoyale] fix view
Browse files Browse the repository at this point in the history
  • Loading branch information
japandotorg committed Oct 15, 2023
1 parent f8ebe29 commit 8f9f047
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions battleroyale/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,12 @@ async def on_timeout(self) -> None:
async def _callback(
self: RemainingPlayerButton, interaction: discord.Interaction[Red]
) -> None:
await interaction.response.defer()
remaining_player_str = humanize_list(
[m.display_name for m in sorted(self.view.remaining_players, key=lambda m: m.mention)]
)
remaining_players_str = (
f"{remaining_player_str[:3000]}..."
if len(remaining_player_str) > 3000
f"{remaining_player_str[:2000]}..."
if len(remaining_player_str) > 2000
else remaining_player_str
)
embed: discord.Embed = discord.Embed.from_dict(
Expand All @@ -137,4 +136,4 @@ async def _callback(
"color": self.view.color,
}
)
await interaction.followup.send(embed=embed)
await interaction.response.send_message(embed=embed, ephemeral=True)

0 comments on commit 8f9f047

Please sign in to comment.