diff options
| author | 2022-10-02 15:50:36 +0100 | |
|---|---|---|
| committer | 2022-10-02 15:50:36 +0100 | |
| commit | 3943d271c6ed88adc2f6d55a4581193cbc6bd21f (patch) | |
| tree | df252009ee0f22539c81b9d7c2f85efb94ca9cf1 /bot/exts | |
| parent | Fix order of function parameters on @discord.ui.select (diff) | |
Fix order of function parameters on @discord.ui.button
Diffstat (limited to 'bot/exts')
| -rw-r--r-- | bot/exts/events/advent_of_code/views/dayandstarview.py | 2 | ||||
| -rw-r--r-- | bot/exts/events/trivianight/_scoreboard.py | 10 | 
2 files changed, 6 insertions, 6 deletions
diff --git a/bot/exts/events/advent_of_code/views/dayandstarview.py b/bot/exts/events/advent_of_code/views/dayandstarview.py index d23de2c8..f0ebc803 100644 --- a/bot/exts/events/advent_of_code/views/dayandstarview.py +++ b/bot/exts/events/advent_of_code/views/dayandstarview.py @@ -69,7 +69,7 @@ class AoCDropdownView(discord.ui.View):          self.star = select.values[0]      @discord.ui.button(label="Fetch", style=discord.ButtonStyle.blurple) -    async def fetch(self, _: discord.ui.Button, interaction: discord.Interaction) -> None: +    async def fetch(self, interaction: discord.Interaction, _: discord.ui.Button) -> None:          """Button that fetches the statistics based on the dropdown values."""          if self.day == 0 or self.star == 0:              await interaction.response.send_message( diff --git a/bot/exts/events/trivianight/_scoreboard.py b/bot/exts/events/trivianight/_scoreboard.py index a5a5fcac..8744b9da 100644 --- a/bot/exts/events/trivianight/_scoreboard.py +++ b/bot/exts/events/trivianight/_scoreboard.py @@ -123,26 +123,26 @@ class ScoreboardView(View):          return rank_embed      @discord.ui.button(label="Scoreboard for Speed", style=ButtonStyle.green) -    async def speed_leaderboard(self, button: Button, interaction: Interaction) -> None: +    async def speed_leaderboard(self, interaction: Interaction, _: Button) -> None:          """          Send an ephemeral message with the speed leaderboard embed.          Parameters: -            - button: The discord.ui.Button instance representing the `Speed Leaderboard` button. -            - interaction: The discord.Interaction instance containing information on the interaction between the user +             - interaction: The discord.Interaction instance containing information on the interaction between the user              and the button. +            - button: The discord.ui.Button instance representing the `Speed Leaderboard` button.          """          await interaction.response.send_message(embed=await self._create_speed_embed(), ephemeral=True)      @discord.ui.button(label="What's my rank?", style=ButtonStyle.blurple) -    async def rank_button(self, button: Button, interaction: Interaction) -> None: +    async def rank_button(self, interaction: Interaction, _: Button) -> None:          """          Send an ephemeral message with the user's rank for the overall points/average speed.          Parameters: -            - button: The discord.ui.Button instance representing the `What's my rank?` button.              - interaction: The discord.Interaction instance containing information on the interaction between the user              and the button. +            - button: The discord.ui.Button instance representing the `What's my rank?` button.          """          await interaction.response.send_message(embed=self._get_rank(interaction.user), ephemeral=True)  |