diff --git a/src/NadekoBot/Modules/Administration/Commands/MuteCommands.cs b/src/NadekoBot/Modules/Administration/Commands/MuteCommands.cs index 8dac31eb..5f67b3dd 100644 --- a/src/NadekoBot/Modules/Administration/Commands/MuteCommands.cs +++ b/src/NadekoBot/Modules/Administration/Commands/MuteCommands.cs @@ -156,7 +156,7 @@ namespace NadekoBot.Modules.Administration guildMuteRoles.AddOrUpdate(Context.Guild.Id, name, (id, old) => name); await uow.CompleteAsync().ConfigureAwait(false); } - await Context.Channel.SendConfirmAsync("☑️ **New mute role set.**").ConfigureAwait(false); + await ReplyConfirmLocalized("mute_role_set").ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] @@ -174,12 +174,12 @@ namespace NadekoBot.Modules.Administration { try { - await MuteUser(user).ConfigureAwait(false); - await Context.Channel.SendConfirmAsync($"🔇 **{user}** has been **muted** from text and voice chat.").ConfigureAwait(false); + await MuteUser(user).ConfigureAwait(false); + await ReplyConfirmLocalized("user_muted", Format.Bold(user.ToString())).ConfigureAwait(false); } catch { - await Context.Channel.SendErrorAsync("⚠️ I most likely don't have the permission necessary for that.").ConfigureAwait(false); + await ReplyErrorLocalized("mute_error").ConfigureAwait(false); } } @@ -192,11 +192,11 @@ namespace NadekoBot.Modules.Administration try { await UnmuteUser(user).ConfigureAwait(false); - await Context.Channel.SendConfirmAsync($"🔉 **{user}** has been **unmuted** from text and voice chat.").ConfigureAwait(false); + await ReplyConfirmLocalized("user_unmuted", Format.Bold(user.ToString())).ConfigureAwait(false); } catch { - await Context.Channel.SendErrorAsync("⚠️ I most likely don't have the permission necessary for that.").ConfigureAwait(false); + await ReplyErrorLocalized("mute_error").ConfigureAwait(false); } } @@ -209,11 +209,11 @@ namespace NadekoBot.Modules.Administration { await user.AddRolesAsync(await GetMuteRole(Context.Guild).ConfigureAwait(false)).ConfigureAwait(false); UserMuted(user, MuteType.Chat); - await Context.Channel.SendConfirmAsync($"✏️🚫 **{user}** has been **muted** from chatting.").ConfigureAwait(false); + await ReplyConfirmLocalized("user_chat_mute", Format.Bold(user.ToString())).ConfigureAwait(false); } catch { - await Context.Channel.SendErrorAsync("⚠️ I most likely don't have the permission necessary for that.").ConfigureAwait(false); + await ReplyErrorLocalized("mute_error").ConfigureAwait(false); } } @@ -226,11 +226,11 @@ namespace NadekoBot.Modules.Administration { await user.RemoveRolesAsync(await GetMuteRole(Context.Guild).ConfigureAwait(false)).ConfigureAwait(false); UserUnmuted(user, MuteType.Chat); - await Context.Channel.SendConfirmAsync($"✏️✅ **{user}** has been **unmuted** from chatting.").ConfigureAwait(false); + await ReplyConfirmLocalized("user_chat_unmute", Format.Bold(user.ToString())).ConfigureAwait(false); } catch { - await Context.Channel.SendErrorAsync("⚠️ I most likely don't have the permission necessary for that.").ConfigureAwait(false); + await ReplyErrorLocalized("mute_error").ConfigureAwait(false); } } @@ -243,11 +243,11 @@ namespace NadekoBot.Modules.Administration { await user.ModifyAsync(usr => usr.Mute = true).ConfigureAwait(false); UserMuted(user, MuteType.Voice); - await Context.Channel.SendConfirmAsync($"🎙🚫 **{user}** has been **voice muted**.").ConfigureAwait(false); + await ReplyConfirmLocalized("user_voice_mute", Format.Bold(user.ToString())).ConfigureAwait(false); } catch { - await Context.Channel.SendErrorAsync("⚠️ I most likely don't have the permission necessary for that.").ConfigureAwait(false); + await ReplyErrorLocalized("mute_error").ConfigureAwait(false); } } @@ -260,11 +260,11 @@ namespace NadekoBot.Modules.Administration { await user.ModifyAsync(usr => usr.Mute = false).ConfigureAwait(false); UserUnmuted(user, MuteType.Voice); - await Context.Channel.SendConfirmAsync($"🎙✅ **{user}** has been **voice unmuted**.").ConfigureAwait(false); + await ReplyConfirmLocalized("user_voice_unmute", Format.Bold(user.ToString())).ConfigureAwait(false); } catch { - await Context.Channel.SendErrorAsync("⚠️ I most likely don't have the permission necessary for that.").ConfigureAwait(false); + await ReplyErrorLocalized("mute_error").ConfigureAwait(false); } } } diff --git a/src/NadekoBot/Resources/ResponseStrings.Designer.cs b/src/NadekoBot/Resources/ResponseStrings.Designer.cs index 975e2331..493016ee 100644 --- a/src/NadekoBot/Resources/ResponseStrings.Designer.cs +++ b/src/NadekoBot/Resources/ResponseStrings.Designer.cs @@ -59,6 +59,78 @@ namespace NadekoBot.Resources { } } + /// + /// Looks up a localized string similar to I don't have the permission necessary for that most likely.. + /// + public static string administration_mute_error { + get { + return ResourceManager.GetString("administration_mute_error", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to New mute role set.. + /// + public static string administration_mute_role_set { + get { + return ResourceManager.GetString("administration_mute_role_set", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} has been **muted** from chatting.. + /// + public static string administration_user_chat_mute { + get { + return ResourceManager.GetString("administration_user_chat_mute", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} has been **unmuted** from chatting.. + /// + public static string administration_user_chat_unmute { + get { + return ResourceManager.GetString("administration_user_chat_unmute", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} has been **muted** from text and voice chat.. + /// + public static string administration_user_muted { + get { + return ResourceManager.GetString("administration_user_muted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} has been **unmuted** from text and voice chat.. + /// + public static string administration_user_unmuted { + get { + return ResourceManager.GetString("administration_user_unmuted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} has been **voice muted**.. + /// + public static string administration_user_voice_mute { + get { + return ResourceManager.GetString("administration_user_voice_mute", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} has been **voice unmuted**.. + /// + public static string administration_user_voice_unmute { + get { + return ResourceManager.GetString("administration_user_voice_unmute", resourceCulture); + } + } + /// /// Looks up a localized string similar to That base is already claimed or destroyed.. /// diff --git a/src/NadekoBot/Resources/ResponseStrings.resx b/src/NadekoBot/Resources/ResponseStrings.resx index 5285f3b6..480a91f0 100644 --- a/src/NadekoBot/Resources/ResponseStrings.resx +++ b/src/NadekoBot/Resources/ResponseStrings.resx @@ -298,6 +298,30 @@ You fainted, so you are not able to move! + + I don't have the permission necessary for that most likely. + + + New mute role set. + + + {0} has been **muted** from chatting. + + + {0} has been **unmuted** from chatting. + + + {0} has been **muted** from text and voice chat. + + + {0} has been **unmuted** from text and voice chat. + + + {0} has been **voice muted**. + + + {0} has been **voice unmuted**. + Back to ToC