Pycord-Development / pycord

Pycord is a modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python
https://docs.pycord.dev
MIT License
2.75k stars 462 forks source link

feat: :sparkles: Add missing soundboard and monetization permissions #2620

Closed Paillat-dev closed 3 weeks ago

Paillat-dev commented 1 month ago

Summary

Information

Checklist

Paillat-dev commented 1 month ago

This:

@bot.slash_command()
async def toggle_soundboard_perms_false(ctx: discord.ApplicationContext, channel: discord.VoiceChannel):
    await channel.edit(overwrites={ctx.guild.default_role: discord.PermissionOverwrite(use_soundboard=False)})
    await ctx.respond(f"Soundboard perms for {channel} have been toggled off.")

@bot.slash_command()
async def toggle_soundboard_perms_true(ctx: discord.ApplicationContext, channel: discord.VoiceChannel):
    await channel.edit(overwrites={ctx.guild.default_role: discord.PermissionOverwrite(use_soundboard=True)})

    await ctx.respond(f"Soundboard perms for {channel} have been toggled on.")

@bot.slash_command()
async def toggle_soundboard_perms_default(ctx: discord.ApplicationContext, channel: discord.VoiceChannel):
    await channel.edit(overwrites={ctx.guild.default_role: discord.PermissionOverwrite(use_soundboard=None)})

    await ctx.respond(f"Soundboard perms for {channel} have been reset to default.")
JustaSqu1d commented 1 month ago

Might as well also add USE_EXTERNAL_SOUNDS(1 << 45)

Paillat-dev commented 1 month ago

Pls don't merge yet