Fixed most of the commands which used wrong error color for confirm messages

This commit is contained in:
Kwoth
2021-09-16 23:09:17 +02:00
parent a09be96200
commit 619bee811d
19 changed files with 33 additions and 33 deletions

View File

@@ -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
{

View File

@@ -61,7 +61,7 @@ namespace NadekoBot.Modules.Administration
if (msg is null)
return;
await ReplyErrorLocalizedAsync(strs.reprm(msg));
await ReplyConfirmLocalizedAsync(strs.reprm(msg));
}
}
}

View File

@@ -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"));
}
}

View File

@@ -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]

View File

@@ -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));
}
}

View File

@@ -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));
}
}

View File

@@ -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));
}

View File

@@ -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)
{

View File

@@ -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));
}
}

View File

@@ -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]

View File

@@ -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));
}
}

View File

@@ -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]

View File

@@ -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]

View File

@@ -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]

View File

@@ -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]

View File

@@ -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]

View File

@@ -148,7 +148,7 @@ namespace NadekoBot.Modules.Utility
}
else
{
await ReplyErrorLocalizedAsync(strs.reminder_deleted(index + 1));
await ReplyConfirmLocalizedAsync(strs.reminder_deleted(index + 1));
}
}

View File

@@ -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]

View File

@@ -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]