forked from TeamInklings/Octobot
Add 'ModeratorRole' guild setting (#290)
Octobot has various moderation commands such as /ban, /mute, /kick. These commands add multiple features to Discord's built-in functions (such as durations and logging). Some admins may want to force their users to use Octobot's commands instead of Discord UI functions. However, due to the current design, they can't take away the permissions as that remove access to the respective command. This PR adds the `ModeratorRole` option which allows anyone who has `ManageMessages` permission and the role to perform any moderator action. If the role is not set, the Discord permissions are checked instead. If the user doesn't have the role, but has the permission, they can still run the command. --------- Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
5e4d0a528c
commit
171cfaea1a
13 changed files with 252 additions and 163 deletions
|
@ -76,6 +76,7 @@ public static class GuildSettings
|
|||
public static readonly SnowflakeOption EventNotificationChannel = new("EventNotificationChannel");
|
||||
public static readonly SnowflakeOption DefaultRole = new("DefaultRole");
|
||||
public static readonly SnowflakeOption MuteRole = new("MuteRole");
|
||||
public static readonly SnowflakeOption ModeratorRole = new("ModeratorRole");
|
||||
public static readonly SnowflakeOption EventNotificationRole = new("EventNotificationRole");
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -26,6 +26,7 @@ public enum AllOptionsEnum
|
|||
[UsedImplicitly] EventNotificationChannel,
|
||||
[UsedImplicitly] DefaultRole,
|
||||
[UsedImplicitly] MuteRole,
|
||||
[UsedImplicitly] ModeratorRole,
|
||||
[UsedImplicitly] EventNotificationRole,
|
||||
[UsedImplicitly] EventEarlyNotificationOffset
|
||||
}
|
||||
|
|
Reference in a new issue