diff --git a/src/NadekoBot/Modules/Administration/Administration.cs b/src/NadekoBot/Modules/Administration/Administration.cs index 5b0adfaa..fffac1f7 100644 --- a/src/NadekoBot/Modules/Administration/Administration.cs +++ b/src/NadekoBot/Modules/Administration/Administration.cs @@ -12,6 +12,7 @@ using NadekoBot.Services.Database.Models; using static NadekoBot.Modules.Permissions.Permissions; using System.Collections.Concurrent; using NLog; +using NadekoBot.Modules.Permissions; namespace NadekoBot.Modules.Administration { @@ -200,12 +201,13 @@ namespace NadekoBot.Modules.Administration [RequireContext(ContextType.Guild)] [RequireUserPermission(GuildPermission.ManageRoles)] [RequireBotPermission(GuildPermission.ManageRoles)] - public async Task RoleHoist(string roleSearchName, bool targetState) + public async Task RoleHoist(string roleSearchName, PermissionAction targetState) { var roleName = roleSearchName.ToUpperInvariant(); var role = Context.Guild.Roles.FirstOrDefault(r => r.Name.ToUpperInvariant() == roleName); - await role.ModifyAsync(r => r.Hoist = targetState).ConfigureAwait(false); + await role.ModifyAsync(r => r.Hoist = targetState.Value).ConfigureAwait(false); + await ReplyConfirmLocalized("rh", Format.Bold(role.Name), Format.Bold(targetState.Value.ToString())).ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] diff --git a/src/NadekoBot/Resources/ResponseStrings.Designer.cs b/src/NadekoBot/Resources/ResponseStrings.Designer.cs index f4171166..1836004a 100644 --- a/src/NadekoBot/Resources/ResponseStrings.Designer.cs +++ b/src/NadekoBot/Resources/ResponseStrings.Designer.cs @@ -1168,6 +1168,15 @@ namespace NadekoBot.Resources { } } + /// + /// Looks up a localized string similar to Set the display of guild role {0} to {1}.. + /// + public static string administration_rh { + get { + return ResourceManager.GetString("administration_rh", resourceCulture); + } + } + /// /// Looks up a localized string similar to Role {0} as been added to the list.. /// diff --git a/src/NadekoBot/Resources/ResponseStrings.resx b/src/NadekoBot/Resources/ResponseStrings.resx index 2a1d1e7f..e3de1903 100644 --- a/src/NadekoBot/Resources/ResponseStrings.resx +++ b/src/NadekoBot/Resources/ResponseStrings.resx @@ -2406,4 +2406,7 @@ Owner ID: {2} Time in {0} is {1} - {2} Time in London, UK is 15:30 - Time Zone Name + + Set the display of guild role {0} to {1}. + \ No newline at end of file