Skip to content

Commit

Permalink
Update wavelink to 3.1.0 and use pip-tools.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sachaa-Thanasius committed Dec 13, 2023
1 parent 9544001 commit 4cdbb4b
Show file tree
Hide file tree
Showing 6 changed files with 536 additions and 13 deletions.
2 changes: 1 addition & 1 deletion musicbot/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def __init__(self, config: LavalinkCreds) -> None:
self.config = config
super().__init__(
intents=discord.Intents(guilds=True, voice_states=True),
activity=discord.Game(name="https:/Sachaa-Thanasius/discord-musicbot"),
activity=discord.Game(name="https:/SutaHelmIndustries/discord-musicbot"),
)
self.tree = VersionableTree(self)

Expand Down
2 changes: 1 addition & 1 deletion musicbot/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ async def muse_play(itx: discord.Interaction[MusicBot], query: str) -> None:
await itx.followup.send(f"Added {added} tracks from the `{tracks.name}` playlist to the queue.")
else:
track = tracks[0]
track.requester = itx.user.mention # type: ignore # Runtime attribute assignment.
track.extras.requester = itx.user.mention
await vc.queue.put_wait(track)
await itx.followup.send(f"Added `{track.title}` to the queue.")

Expand Down
2 changes: 1 addition & 1 deletion musicbot/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ def create_track_embed(title: str, track: wavelink.Playable) -> discord.Embed:
if track.album.name:
embed.add_field(name="Album", value=track.album.name)

if requester := getattr(track, "requester", None):
if requester := getattr(track.extras, "requester", None):
embed.add_field(name="Requested By", value=requester)

return embed
Expand Down
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
[project]
name = "discord-musicbot"
version = "0.1.1"
description = "A minimal configuration Discord bot for playing music."
description = "A small Discord bot for playing music."
readme = "README.md"
license = "MIT"
requires-python = ">=3.11"
authors = [{ name = "Sachaa-Thanasius", email = "[email protected]" }]

[project.urls]
Homepage = "https:/Sachaa-Thanasius/discord-musicbot"
"Bug Tracker" = "https:/Sachaa-Thanasius/discord-musicbot/issues"
Homepage = "https:/SutaHelmIndustries/discord-musicbot"
"Bug Tracker" = "https:/SutaHelmIndustries/discord-musicbot/issues"

[tool.ruff]
line-length = 120
Expand Down
6 changes: 6 additions & 0 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
base2048>=0.1.3
discord.py[voice]>=2.3.2,<3
platformdirs>=3.10.0
wavelink>=3.1.0
uvloop>=0.17.0;sys_platform=="linux"
xxhash>=3.3.0
Loading

0 comments on commit 4cdbb4b

Please sign in to comment.