Require webhook permission for Discord integration

master
John Montagu, the 4th Earl of Sandvich 2025-05-15 10:54:44 -07:00
parent 2d3f7f68fe
commit ff6bc7f512
Signed by: sandvich
GPG Key ID: 9A39BE37E602B22D
1 changed files with 1 additions and 0 deletions

View File

@ -102,6 +102,7 @@ client = Client(command_prefix="!", intents=intents)
description="Set up announcements webhook in this channel", description="Set up announcements webhook in this channel",
guild=guild_id guild=guild_id
) )
@discord.app_commands.default_permissions(manage_webhooks=True)
async def setup_announcements(interaction: discord.Interaction): async def setup_announcements(interaction: discord.Interaction):
await interaction.response.send_message( await interaction.response.send_message(
"Setting up announcement webhook. Any existing webhooks madde by " + "Setting up announcement webhook. Any existing webhooks madde by " +