Skip to content

Commit

Permalink
Minor changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sachaa-Thanasius committed Nov 28, 2023
1 parent c02e8ca commit 2530d83
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
9 changes: 2 additions & 7 deletions musicbot/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ async def muse_play(
await itx.followup.send(notif_text)

if not vc.playing:
first_track = vc.queue.get()
await vc.play(first_track)
await vc.play(vc.queue.get())


@app_commands.command(name="pause")
Expand Down Expand Up @@ -195,11 +194,7 @@ async def queue_get(self, itx: discord.Interaction[MusicBot]) -> None:
current_embed = create_track_embed("Now Playing", vc.current)
queue_embeds.append(current_embed)

view = MusicQueueView(
author_id=itx.user.id,
pages_content=[track.title for track in vc.queue],
per=10,
)
view = MusicQueueView(itx.user.id, [track.title for track in vc.queue], per=10)
queue_embeds.append(view.get_first_page())
await itx.response.send_message(embeds=queue_embeds, view=view)
view.message = await itx.original_response()
Expand Down
12 changes: 3 additions & 9 deletions musicbot/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,17 +199,11 @@ class MusicPlayer(wavelink.Player):
Attributes
----------
queue : :class:`MusicQueue`
A version of :class:`wavelink.Queue` extra operations.
A version of :class:`wavelink.Queue` with extra operations.
"""

def __init__(
self,
client: discord.Client = discord.utils.MISSING,
channel: discord.abc.Connectable = discord.utils.MISSING,
*,
nodes: list[wavelink.Node] | None = None,
) -> None:
super().__init__(client, channel, nodes=nodes)
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, *kwargs)
self.autoplay = wavelink.AutoPlayMode.partial
self.queue: MusicQueue = MusicQueue() # type: ignore # overridden symbol

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ ignore = [
"SIM105", # Suppressable exception. I'm not paying the overhead of contextlib.suppress for stylistic choices.
"C90", # McCabe complexity memes.
"ANN101", # Type of self is implied.
"ANN401", # Need Any for args and kwargs.
"PLR", # Complexity things.
# Recommended by ruff when using ruff format.
"COM812",
Expand Down

0 comments on commit 2530d83

Please sign in to comment.