Skip to content

Commit

Permalink
Remove unnecessary ignores.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sachaa-Thanasius committed Jun 22, 2024
1 parent 29366ff commit 949673a
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions radiobot.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,16 @@ async def _help(itx: discord.Interaction[RadioBot], ephemeral: bool = True) -> N
await itx.response.send_message(embed=help_embed, ephemeral=ephemeral)


APP_COMMANDS = [radio_set, radio_get, radio_delete, radio_restart, radio_next, current, volume, _help] # pyright: ignore [reportUnknownVariableType]
APP_COMMANDS: list[app_commands.Command[Any, ..., None] | app_commands.Group] = [
radio_set,
radio_get,
radio_delete,
radio_restart,
radio_next,
current,
volume,
_help,
]


class RadioPlayer(wavelink.Player):
Expand Down Expand Up @@ -616,8 +625,8 @@ async def setup_hook(self) -> None:
self.radio_loop.start()

# Add the app commands to the tree.
for cmd in APP_COMMANDS: # pyright: ignore [reportUnknownVariableType]
self.tree.add_command(cmd) # pyright: ignore [reportUnknownArgumentType]
for cmd in APP_COMMANDS:
self.tree.add_command(cmd)

# Sync the tree if it's different from the previous version, using hashing for comparison.
await self.tree.sync_if_commands_updated()
Expand Down

0 comments on commit 949673a

Please sign in to comment.