diff options
| author | 2022-10-02 17:14:23 +0100 | |
|---|---|---|
| committer | 2022-10-02 17:14:23 +0100 | |
| commit | f07d144c7ad2ac1eae62ce75d9c0557a26b6579e (patch) | |
| tree | 3dacae9666c448f5308fc3bc95e9bb90bbf14cd7 /bot/exts | |
| parent | Correct logic in `format_embed`. (diff) | |
| parent | Merge pull request #1111 from python-discord/fix-GH-1108 (diff) | |
Merge branch 'main' into fix-issue-1107
Diffstat (limited to '')
| -rw-r--r-- | bot/exts/events/advent_of_code/views/dayandstarview.py | 6 | ||||
| -rw-r--r-- | bot/exts/events/trivianight/_scoreboard.py | 8 | ||||
| -rw-r--r-- | bot/exts/utilities/epoch.py | 2 | 
3 files changed, 8 insertions, 8 deletions
diff --git a/bot/exts/events/advent_of_code/views/dayandstarview.py b/bot/exts/events/advent_of_code/views/dayandstarview.py index 5529c12b..f0ebc803 100644 --- a/bot/exts/events/advent_of_code/views/dayandstarview.py +++ b/bot/exts/events/advent_of_code/views/dayandstarview.py @@ -55,7 +55,7 @@ class AoCDropdownView(discord.ui.View):          options=[discord.SelectOption(label=str(i)) for i in range(1, 26)],          custom_id="day_select"      ) -    async def day_select(self, select: discord.ui.Select, interaction: discord.Interaction) -> None: +    async def day_select(self, _: discord.Interaction, select: discord.ui.Select) -> None:          """Dropdown to choose a Day of the AoC."""          self.day = select.values[0] @@ -64,12 +64,12 @@ class AoCDropdownView(discord.ui.View):          options=[discord.SelectOption(label=str(i)) for i in range(1, 3)],          custom_id="star_select"      ) -    async def star_select(self, select: discord.ui.Select, interaction: discord.Interaction) -> None: +    async def star_select(self, _: discord.Interaction, select: discord.ui.Select) -> None:          """Dropdown to choose either the first or the second star."""          self.star = select.values[0]      @discord.ui.button(label="Fetch", style=discord.ButtonStyle.blurple) -    async def fetch(self, button: 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..bd61be3d 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              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) diff --git a/bot/exts/utilities/epoch.py b/bot/exts/utilities/epoch.py index bf67067c..6f572640 100644 --- a/bot/exts/utilities/epoch.py +++ b/bot/exts/utilities/epoch.py @@ -119,7 +119,7 @@ class TimestampMenuView(discord.ui.View):              self.dropdown.add_option(label=label, description=date_time)      @discord.ui.select(placeholder="Select the format of your timestamp") -    async def select_format(self, _: discord.ui.Select, interaction: discord.Interaction) -> discord.Message: +    async def select_format(self, interaction: discord.Interaction, _: discord.ui.Select) -> discord.Message:          """Drop down menu which contains a list of formats which discord timestamps can take."""          selected = interaction.data["values"][0]          if selected == "Epoch":  |