From 619bee811d35857e67dd384a6f5442c34a9f543c Mon Sep 17 00:00:00 2001 From: Kwoth Date: Thu, 16 Sep 2021 23:09:17 +0200 Subject: [PATCH] Fixed most of the commands which used wrong error color for confirm messages --- src/NadekoBot/Modules/Administration/MuteCommands.cs | 6 +++--- .../Modules/Administration/PlayingRotateCommands.cs | 2 +- .../Modules/Administration/ProtectionCommands.cs | 10 +++++----- src/NadekoBot/Modules/Administration/RoleCommands.cs | 2 +- .../Administration/SelfAssignedRolesCommands.cs | 4 ++-- .../Modules/CustomReactions/CustomReactions.cs | 2 +- src/NadekoBot/Modules/Gambling/Gambling.cs | 6 +++--- src/NadekoBot/Modules/Gambling/WaifuClaimCommands.cs | 4 ++-- src/NadekoBot/Modules/Help/Help.cs | 2 +- src/NadekoBot/Modules/Music/Music.cs | 4 ++-- src/NadekoBot/Modules/Nsfw/Nsfw.cs | 8 ++++---- src/NadekoBot/Modules/Permissions/Permissions.cs | 2 +- src/NadekoBot/Modules/Searches/FeedCommands.cs | 2 +- .../Modules/Searches/StreamNotificationCommands.cs | 2 +- src/NadekoBot/Modules/Searches/TranslatorCommands.cs | 2 +- src/NadekoBot/Modules/Utility/CommandMapCommands.cs | 2 +- src/NadekoBot/Modules/Utility/RemindCommands.cs | 2 +- src/NadekoBot/Modules/Xp/ResetCommands.cs | 2 +- src/NadekoBot/Modules/Xp/Xp.cs | 2 +- 19 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/NadekoBot/Modules/Administration/MuteCommands.cs b/src/NadekoBot/Modules/Administration/MuteCommands.cs index 6e53a578c..6360689c0 100644 --- a/src/NadekoBot/Modules/Administration/MuteCommands.cs +++ b/src/NadekoBot/Modules/Administration/MuteCommands.cs @@ -90,7 +90,7 @@ namespace NadekoBot.Modules.Administration return; await _service.TimedMute(user, ctx.User, time.Time, reason: reason).ConfigureAwait(false); - await ReplyErrorLocalizedAsync(strs.user_muted_time(Format.Bold(user.ToString()), (int)time.Time.TotalMinutes)); + await ReplyConfirmLocalizedAsync(strs.user_muted_time(Format.Bold(user.ToString()), (int)time.Time.TotalMinutes)); } catch (Exception ex) { @@ -150,7 +150,7 @@ namespace NadekoBot.Modules.Administration return; await _service.TimedMute(user, ctx.User, time.Time, MuteType.Chat, reason: reason).ConfigureAwait(false); - await ReplyErrorLocalizedAsync(strs.user_chat_mute_time(Format.Bold(user.ToString()), (int)time.Time.TotalMinutes)); + await ReplyConfirmLocalizedAsync(strs.user_chat_mute_time(Format.Bold(user.ToString()), (int)time.Time.TotalMinutes)); } catch (Exception ex) { @@ -209,7 +209,7 @@ namespace NadekoBot.Modules.Administration return; await _service.TimedMute(user, ctx.User, time.Time, MuteType.Voice, reason: reason).ConfigureAwait(false); - await ReplyErrorLocalizedAsync(strs.user_voice_mute_time(Format.Bold(user.ToString()), (int)time.Time.TotalMinutes)); + await ReplyConfirmLocalizedAsync(strs.user_voice_mute_time(Format.Bold(user.ToString()), (int)time.Time.TotalMinutes)); } catch { diff --git a/src/NadekoBot/Modules/Administration/PlayingRotateCommands.cs b/src/NadekoBot/Modules/Administration/PlayingRotateCommands.cs index 2de2b730f..4348f0f88 100644 --- a/src/NadekoBot/Modules/Administration/PlayingRotateCommands.cs +++ b/src/NadekoBot/Modules/Administration/PlayingRotateCommands.cs @@ -61,7 +61,7 @@ namespace NadekoBot.Modules.Administration if (msg is null) return; - await ReplyErrorLocalizedAsync(strs.reprm(msg)); + await ReplyConfirmLocalizedAsync(strs.reprm(msg)); } } } diff --git a/src/NadekoBot/Modules/Administration/ProtectionCommands.cs b/src/NadekoBot/Modules/Administration/ProtectionCommands.cs index 489b61f2a..313dded41 100644 --- a/src/NadekoBot/Modules/Administration/ProtectionCommands.cs +++ b/src/NadekoBot/Modules/Administration/ProtectionCommands.cs @@ -28,7 +28,7 @@ namespace NadekoBot.Modules.Administration return; } - await ReplyErrorLocalizedAsync(strs.protection_not_running("Anti-Alt")); + await ReplyConfirmLocalizedAsync(strs.protection_not_running("Anti-Alt")); } [NadekoCommand, Aliases] @@ -69,11 +69,11 @@ namespace NadekoBot.Modules.Administration { if (_service.TryStopAntiRaid(ctx.Guild.Id)) { - return ReplyErrorLocalizedAsync(strs.prot_disable("Anti-Raid")); + return ReplyConfirmLocalizedAsync(strs.prot_disable("Anti-Raid")); } else { - return ReplyErrorLocalizedAsync(strs.protection_not_running("Anti-Raid")); + return ReplyPendingLocalizedAsync(strs.protection_not_running("Anti-Raid")); } } @@ -145,11 +145,11 @@ namespace NadekoBot.Modules.Administration { if (_service.TryStopAntiSpam(ctx.Guild.Id)) { - return ReplyErrorLocalizedAsync(strs.prot_disable("Anti-Spam")); + return ReplyConfirmLocalizedAsync(strs.prot_disable("Anti-Spam")); } else { - return ReplyErrorLocalizedAsync(strs.protection_not_running("Anti-Spam")); + return ReplyPendingLocalizedAsync(strs.protection_not_running("Anti-Spam")); } } diff --git a/src/NadekoBot/Modules/Administration/RoleCommands.cs b/src/NadekoBot/Modules/Administration/RoleCommands.cs index c8fd936e9..b14e97837 100644 --- a/src/NadekoBot/Modules/Administration/RoleCommands.cs +++ b/src/NadekoBot/Modules/Administration/RoleCommands.cs @@ -189,7 +189,7 @@ namespace NadekoBot.Modules.Administration index--; var rr = rrs[index]; _service.Remove(ctx.Guild.Id, index); - await ReplyErrorLocalizedAsync(strs.reaction_role_removed(index + 1)); + await ReplyConfirmLocalizedAsync(strs.reaction_role_removed(index + 1)); } [NadekoCommand, Aliases] diff --git a/src/NadekoBot/Modules/Administration/SelfAssignedRolesCommands.cs b/src/NadekoBot/Modules/Administration/SelfAssignedRolesCommands.cs index 7cc94c039..dcb056bf1 100644 --- a/src/NadekoBot/Modules/Administration/SelfAssignedRolesCommands.cs +++ b/src/NadekoBot/Modules/Administration/SelfAssignedRolesCommands.cs @@ -24,11 +24,11 @@ namespace NadekoBot.Modules.Administration if (newVal) { - await ReplyErrorLocalizedAsync(strs.adsarm_enable(Prefix)); + await ReplyConfirmLocalizedAsync(strs.adsarm_enable(Prefix)); } else { - await ReplyErrorLocalizedAsync(strs.adsarm_disable(Prefix)); + await ReplyConfirmLocalizedAsync(strs.adsarm_disable(Prefix)); } } diff --git a/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs b/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs index 58253734c..e9a23903d 100644 --- a/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs +++ b/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs @@ -294,7 +294,7 @@ namespace NadekoBot.Modules.CustomReactions .WithDescription("This will delete all custom reactions on this server.")).ConfigureAwait(false)) { var count = _service.DeleteAllCustomReactions(ctx.Guild.Id); - await ReplyErrorLocalizedAsync(strs.cleared(count)); + await ReplyConfirmLocalizedAsync(strs.cleared(count)); } } diff --git a/src/NadekoBot/Modules/Gambling/Gambling.cs b/src/NadekoBot/Modules/Gambling/Gambling.cs index 9b12b6caf..73d232d70 100644 --- a/src/NadekoBot/Modules/Gambling/Gambling.cs +++ b/src/NadekoBot/Modules/Gambling/Gambling.cs @@ -217,7 +217,7 @@ namespace NadekoBot.Modules.Gambling [Priority(0)] public async Task Cash(ulong userId) { - await ReplyErrorLocalizedAsync(strs.has(Format.Code(userId.ToString()), $"{GetCurrency(userId)} {CurrencySign}")); + await ReplyConfirmLocalizedAsync(strs.has(Format.Code(userId.ToString()), $"{GetCurrency(userId)} {CurrencySign}")); } [NadekoCommand, Aliases] @@ -269,7 +269,7 @@ namespace NadekoBot.Modules.Gambling $"Awarded by bot owner. ({ctx.User.Username}/{ctx.User.Id}) {(msg ?? "")}", amount, gamble: (ctx.Client.CurrentUser.Id != usrId)).ConfigureAwait(false); - await ReplyErrorLocalizedAsync(strs.awarded(n(amount) + CurrencySign, $"<@{usrId}>")); + await ReplyConfirmLocalizedAsync(strs.awarded(n(amount) + CurrencySign, $"<@{usrId}>")); } [NadekoCommand, Aliases] @@ -340,7 +340,7 @@ namespace NadekoBot.Modules.Gambling if (await _cs.RemoveAsync(usrId, $"Taken by bot owner.({ctx.User.Username}/{ctx.User.Id})", amount, gamble: (ctx.Client.CurrentUser.Id != usrId)).ConfigureAwait(false)) - await ReplyErrorLocalizedAsync(strs.take(amount + CurrencySign, $"<@{usrId}>")); + await ReplyConfirmLocalizedAsync(strs.take(amount + CurrencySign, $"<@{usrId}>")); else await ReplyErrorLocalizedAsync(strs.take_fail(amount + CurrencySign, Format.Code(usrId.ToString()), CurrencySign)); } diff --git a/src/NadekoBot/Modules/Gambling/WaifuClaimCommands.cs b/src/NadekoBot/Modules/Gambling/WaifuClaimCommands.cs index 457772a74..eb474dbef 100644 --- a/src/NadekoBot/Modules/Gambling/WaifuClaimCommands.cs +++ b/src/NadekoBot/Modules/Gambling/WaifuClaimCommands.cs @@ -145,11 +145,11 @@ namespace NadekoBot.Modules.Gambling if (result == DivorceResult.SucessWithPenalty) { - await ReplyErrorLocalizedAsync(strs.waifu_divorced_like(Format.Bold(w.Waifu.ToString()), amount + CurrencySign)); + await ReplyConfirmLocalizedAsync(strs.waifu_divorced_like(Format.Bold(w.Waifu.ToString()), amount + CurrencySign)); } else if (result == DivorceResult.Success) { - await ReplyErrorLocalizedAsync(strs.waifu_divorced_notlike(amount + CurrencySign)); + await ReplyConfirmLocalizedAsync(strs.waifu_divorced_notlike(amount + CurrencySign)); } else if (result == DivorceResult.NotYourWife) { diff --git a/src/NadekoBot/Modules/Help/Help.cs b/src/NadekoBot/Modules/Help/Help.cs index 1143e4dcf..b33c5d0ed 100644 --- a/src/NadekoBot/Modules/Help/Help.cs +++ b/src/NadekoBot/Modules/Help/Help.cs @@ -434,7 +434,7 @@ namespace NadekoBot.Modules.Help [NadekoCommand, Aliases] public async Task Donate() { - await ReplyErrorLocalizedAsync(strs.donate(PatreonUrl, PaypalUrl)); + await ReplyConfirmLocalizedAsync(strs.donate(PatreonUrl, PaypalUrl)); } } diff --git a/src/NadekoBot/Modules/Music/Music.cs b/src/NadekoBot/Modules/Music/Music.cs index 6cb8d686e..371909932 100644 --- a/src/NadekoBot/Modules/Music/Music.cs +++ b/src/NadekoBot/Modules/Music/Music.cs @@ -125,7 +125,7 @@ namespace NadekoBot.Modules.Music queuedMessage?.DeleteAfter(10, _logService); if (mp.IsStopped) { - var msg = await ReplyErrorLocalizedAsync(strs.queue_stopped(Format.Code(Prefix + "play"))); + var msg = await ReplyPendingLocalizedAsync(strs.queue_stopped(Format.Code(Prefix + "play"))); msg.DeleteAfter(10, _logService); } } @@ -230,7 +230,7 @@ namespace NadekoBot.Modules.Music return; await _service.SetVolumeAsync(ctx.Guild.Id, vol); - await ReplyErrorLocalizedAsync(strs.volume_set(vol)); + await ReplyConfirmLocalizedAsync(strs.volume_set(vol))); } [NadekoCommand, Aliases] diff --git a/src/NadekoBot/Modules/Nsfw/Nsfw.cs b/src/NadekoBot/Modules/Nsfw/Nsfw.cs index a42127c80..04470dbfd 100644 --- a/src/NadekoBot/Modules/Nsfw/Nsfw.cs +++ b/src/NadekoBot/Modules/Nsfw/Nsfw.cs @@ -189,7 +189,7 @@ namespace NadekoBot.Modules.NSFW return t; }); - await ReplyErrorLocalizedAsync(strs.started(interval)); + await ReplyConfirmLocalizedAsync(strs.started(interval)); } [NadekoCommand, Aliases] @@ -229,7 +229,7 @@ namespace NadekoBot.Modules.NSFW return t; }); - await ReplyErrorLocalizedAsync(strs.started(interval)); + await ReplyConfirmLocalizedAsync(strs.started(interval)); } #endif @@ -363,9 +363,9 @@ namespace NadekoBot.Modules.NSFW var added = _service.ToggleBlacklistedTag(ctx.Guild.Id, tag); if (added) - await ReplyErrorLocalizedAsync(strs.blacklisted_tag_add(tag)); + await ReplyPendingLocalizedAsync(strs.blacklisted_tag_add(tag)); else - await ReplyErrorLocalizedAsync(strs.blacklisted_tag_remove(tag)); + await ReplyPendingLocalizedAsync(strs.blacklisted_tag_remove(tag)); } } diff --git a/src/NadekoBot/Modules/Permissions/Permissions.cs b/src/NadekoBot/Modules/Permissions/Permissions.cs index 741ecc481..6e3c9ac91 100644 --- a/src/NadekoBot/Modules/Permissions/Permissions.cs +++ b/src/NadekoBot/Modules/Permissions/Permissions.cs @@ -217,7 +217,7 @@ namespace NadekoBot.Modules.Permissions { } } - await ReplyErrorLocalizedAsync(strs.perm_out_of_range).ConfigureAwait(false); + await ReplyConfirmLocalizedAsync(strs.perm_out_of_range).ConfigureAwait(false); } [NadekoCommand, Aliases] diff --git a/src/NadekoBot/Modules/Searches/FeedCommands.cs b/src/NadekoBot/Modules/Searches/FeedCommands.cs index c884a92da..237f3bd79 100644 --- a/src/NadekoBot/Modules/Searches/FeedCommands.cs +++ b/src/NadekoBot/Modules/Searches/FeedCommands.cs @@ -66,7 +66,7 @@ namespace NadekoBot.Modules.Searches } } - await ReplyErrorLocalizedAsync(strs.feed_not_valid).ConfigureAwait(false); + await ReplyConfirmLocalizedAsync(strs.feed_not_valid).ConfigureAwait(false); } [NadekoCommand, Aliases] diff --git a/src/NadekoBot/Modules/Searches/StreamNotificationCommands.cs b/src/NadekoBot/Modules/Searches/StreamNotificationCommands.cs index 3f36b5c9a..7a067b078 100644 --- a/src/NadekoBot/Modules/Searches/StreamNotificationCommands.cs +++ b/src/NadekoBot/Modules/Searches/StreamNotificationCommands.cs @@ -191,7 +191,7 @@ namespace NadekoBot.Modules.Searches return; } - await ReplyErrorLocalizedAsync(strs.stream_message_set_all(count)); + await ReplyConfirmLocalizedAsync(strs.stream_message_set_all(count)); } [NadekoCommand, Aliases] diff --git a/src/NadekoBot/Modules/Searches/TranslatorCommands.cs b/src/NadekoBot/Modules/Searches/TranslatorCommands.cs index 0fb636bf4..7c286cec4 100644 --- a/src/NadekoBot/Modules/Searches/TranslatorCommands.cs +++ b/src/NadekoBot/Modules/Searches/TranslatorCommands.cs @@ -118,7 +118,7 @@ namespace NadekoBot.Modules.Searches _searches.UserLanguages.AddOrUpdate(ucp, langs, (key, val) => langs); - await ReplyErrorLocalizedAsync(strs.atl_set(from, to)); + await ReplyConfirmLocalizedAsync(strs.atl_set(from, to)); } [NadekoCommand, Aliases] diff --git a/src/NadekoBot/Modules/Utility/CommandMapCommands.cs b/src/NadekoBot/Modules/Utility/CommandMapCommands.cs index a7cc4dc34..ade955346 100644 --- a/src/NadekoBot/Modules/Utility/CommandMapCommands.cs +++ b/src/NadekoBot/Modules/Utility/CommandMapCommands.cs @@ -37,7 +37,7 @@ namespace NadekoBot.Modules.Utility public async Task AliasesClear() { var count = _service.ClearAliases(ctx.Guild.Id); - await ReplyErrorLocalizedAsync(strs.aliases_cleared(count)); + await ReplyConfirmLocalizedAsync(strs.aliases_cleared(count)); } [NadekoCommand, Aliases] diff --git a/src/NadekoBot/Modules/Utility/RemindCommands.cs b/src/NadekoBot/Modules/Utility/RemindCommands.cs index 94a3cf0db..7062bc355 100644 --- a/src/NadekoBot/Modules/Utility/RemindCommands.cs +++ b/src/NadekoBot/Modules/Utility/RemindCommands.cs @@ -148,7 +148,7 @@ namespace NadekoBot.Modules.Utility } else { - await ReplyErrorLocalizedAsync(strs.reminder_deleted(index + 1)); + await ReplyConfirmLocalizedAsync(strs.reminder_deleted(index + 1)); } } diff --git a/src/NadekoBot/Modules/Xp/ResetCommands.cs b/src/NadekoBot/Modules/Xp/ResetCommands.cs index 0b691adca..6cd002f8b 100644 --- a/src/NadekoBot/Modules/Xp/ResetCommands.cs +++ b/src/NadekoBot/Modules/Xp/ResetCommands.cs @@ -31,7 +31,7 @@ namespace NadekoBot.Modules.Xp _service.XpReset(ctx.Guild.Id, userId); - await ReplyErrorLocalizedAsync(strs.reset_user(userId)); + await ReplyConfirmLocalizedAsync(strs.reset_user(userId)); } [NadekoCommand, Aliases] diff --git a/src/NadekoBot/Modules/Xp/Xp.cs b/src/NadekoBot/Modules/Xp/Xp.cs index 0c8a8bd8d..dcf851b3f 100644 --- a/src/NadekoBot/Modules/Xp/Xp.cs +++ b/src/NadekoBot/Modules/Xp/Xp.cs @@ -128,7 +128,7 @@ namespace NadekoBot.Modules.Xp public async Task XpRoleReward(int level) { _service.ResetRoleReward(ctx.Guild.Id, level); - await ReplyErrorLocalizedAsync(strs.xp_role_reward_cleared(level)); + await ReplyConfirmLocalizedAsync(strs.xp_role_reward_cleared(level)); } [NadekoCommand, Aliases]