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
Some checks are pending
Run pre-commit / Run pre-commit (push) Waiting to run
This commit is contained in:
parent
e1e43d6df5
commit
8d79407cb4
1 changed files with 6 additions and 6 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Reference in a new issue