Refactor ExtendedAudio commands to improve naming consistency and clarity. Rename 'audioset' to 'extendedaudioset' and update related command examples for better user guidance on configuring voice channel status updates and status format.
Some checks are pending
Run pre-commit / Run pre-commit (push) Waiting to run

This commit is contained in:
Valerie 2025-05-24 07:39:44 -04:00
parent e1e43d6df5
commit 8d79407cb4

View file

@ -38,33 +38,33 @@ class ExtendedAudio(commands.Cog):
if self.task:
self.task.cancel()
@commands.group()
@commands.group(aliases=["eaudioset"])
@commands.guild_only()
@commands.admin_or_permissions(manage_guild=True)
async def audioset(self, ctx: commands.Context):
async def extendedaudioset(self, ctx: commands.Context):
"""Configure ExtendedAudio settings"""
pass
@audioset.command(name="channelstatus")
@extendedaudioset.command(name="channelstatus")
async def set_channel_status(self, ctx: commands.Context, enabled: bool):
"""Toggle voice channel status updates
This will update the voice channel name with the currently playing song
Example: [p]audioset channelstatus true
Example: [p]extendedaudioset channelstatus true
"""
await self.config.guild(ctx.guild).channel_status.set(enabled)
state = "enabled" if enabled else "disabled"
await ctx.send(f"Voice channel status updates {state}.")
@audioset.command(name="statusformat")
@extendedaudioset.command(name="statusformat")
async def set_status_format(self, ctx: commands.Context, *, format_str: str):
"""Set the format for voice channel status updates
Available variables:
{title} - Song title
Example: [p]audioset statusformat 🎵 {title}
Example: [p]extendedaudioset statusformat 🎵 {title}
"""
await self.config.guild(ctx.guild).status_format.set(format_str)
example = format_str.format(title="Never Gonna Give You Up")