diff options
Diffstat (limited to 'src/commands')
| -rw-r--r-- | src/commands/moderation/actions.rs | 2 | ||||
| -rw-r--r-- | src/commands/moderation/config.rs | 17 |
2 files changed, 17 insertions, 2 deletions
diff --git a/src/commands/moderation/actions.rs b/src/commands/moderation/actions.rs index 4d4d0f8..beda3da 100644 --- a/src/commands/moderation/actions.rs +++ b/src/commands/moderation/actions.rs @@ -28,6 +28,7 @@ fn create_moderation_embed( #[poise::command( slash_command, prefix_command, + required_permissions = "BAN_MEMBERS", default_member_permissions = "BAN_MEMBERS" )] pub async fn ban_user( @@ -61,6 +62,7 @@ pub async fn ban_user( #[poise::command( slash_command, prefix_command, + required_permissions = "KICK_MEMBERS", default_member_permissions = "KICK_MEMBERS" )] pub async fn kick_user(ctx: Context<'_>, user: User, reason: Option<String>) -> Result<()> { diff --git a/src/commands/moderation/config.rs b/src/commands/moderation/config.rs index b2b0ab4..967e585 100644 --- a/src/commands/moderation/config.rs +++ b/src/commands/moderation/config.rs @@ -39,6 +39,7 @@ fn prop_to_val(setting: &SettingsProperties, settings: &Settings) -> String { slash_command, prefix_command, subcommands("set", "get"), + required_permissions = "MANAGE_GUILD", default_member_permissions = "MANAGE_GUILD" )] pub async fn config(_ctx: Context<'_>) -> Result<()> { @@ -46,7 +47,13 @@ pub async fn config(_ctx: Context<'_>) -> Result<()> { } #[allow(clippy::too_many_arguments)] -#[poise::command(slash_command, prefix_command, ephemeral, guild_only)] +#[poise::command( + slash_command, + prefix_command, + ephemeral, + guild_only, + required_permissions = "MANAGE_GUILD" +)] pub async fn set( ctx: Context<'_>, #[channel_types("Text")] @@ -129,7 +136,13 @@ pub async fn set( Ok(()) } -#[poise::command(slash_command, prefix_command, ephemeral, guild_only)] +#[poise::command( + slash_command, + prefix_command, + ephemeral, + guild_only, + required_permissions = "MANAGE_GUILD" +)] pub async fn get( ctx: Context<'_>, #[description = "The setting you want to get"] setting: SettingsProperties, |
