Add user selection modal for playlist sharing

Introduces a modal dialog to select a user when sharing a playlist, improving the user experience. Updates the PlaylistView to use the new BaseModal for sharing, and enhances BaseModal to support select components and store their values.
This commit is contained in:
Choco
2025-11-29 11:20:21 +08:00
parent 9201ee730f
commit 8fdceef4db
3 changed files with 30 additions and 4 deletions

View File

@@ -473,7 +473,7 @@ class Playlists(commands.Cog, name="playlist"):
])
@app_commands.autocomplete(name=playlist_autocomplete)
@commands.dynamic_cooldown(cooldown_check, commands.BucketType.guild)
async def permission(self, ctx: commands.Context, name: str, member: discord.Member, permission: str, action: str):
async def permission(self, ctx: commands.Context, member: discord.Member, name: str, permission: str, action: str):
"Grant or revoke permissions for a playlist."
if member.id == ctx.author.id:
return await send_localized_message(ctx, 'playlist.permissions.cannotModifySelf', ephemeral=True)