Removed some lingering strings calling Expressions 'CustomReactions'. Id which shows up when you add a new expr is now correct.

This commit is contained in:
Kwoth
2022-03-04 04:49:46 +01:00
parent ddd0592b30
commit 0e192ee7f0
2 changed files with 33 additions and 34 deletions

View File

@@ -31,7 +31,7 @@ public partial class NadekoExpressions : NadekoModule<NadekoExpressionsService>
if (!AdminInGuildOrOwnerInDm()) if (!AdminInGuildOrOwnerInDm())
{ {
await ReplyErrorLocalizedAsync(strs.insuff_perms); await ReplyErrorLocalizedAsync(strs.expr_insuff_perms);
return; return;
} }
@@ -39,8 +39,8 @@ public partial class NadekoExpressions : NadekoModule<NadekoExpressionsService>
await ctx.Channel.EmbedAsync(_eb.Create() await ctx.Channel.EmbedAsync(_eb.Create()
.WithOkColor() .WithOkColor()
.WithTitle(GetText(strs.new_cust_react)) .WithTitle(GetText(strs.expr_new))
.WithDescription($"#{ex.Id}") .WithDescription($"#{new kwum(ex.Id)}")
.AddField(GetText(strs.trigger), key) .AddField(GetText(strs.trigger), key)
.AddField(GetText(strs.response), .AddField(GetText(strs.response),
message.Length > 1024 ? GetText(strs.redacted_too_long) : message)); message.Length > 1024 ? GetText(strs.redacted_too_long) : message));
@@ -56,7 +56,7 @@ public partial class NadekoExpressions : NadekoModule<NadekoExpressionsService>
if ((channel is null && !_creds.IsOwner(ctx.User)) if ((channel is null && !_creds.IsOwner(ctx.User))
|| (channel is not null && !((IGuildUser)ctx.User).GuildPermissions.Administrator)) || (channel is not null && !((IGuildUser)ctx.User).GuildPermissions.Administrator))
{ {
await ReplyErrorLocalizedAsync(strs.insuff_perms); await ReplyErrorLocalizedAsync(strs.expr_insuff_perms);
return; return;
} }
@@ -65,14 +65,14 @@ public partial class NadekoExpressions : NadekoModule<NadekoExpressionsService>
{ {
await ctx.Channel.EmbedAsync(_eb.Create() await ctx.Channel.EmbedAsync(_eb.Create()
.WithOkColor() .WithOkColor()
.WithTitle(GetText(strs.edited_cust_react)) .WithTitle(GetText(strs.expr_edited))
.WithDescription($"#{id}") .WithDescription($"#{id}")
.AddField(GetText(strs.trigger), ex.Trigger) .AddField(GetText(strs.trigger), ex.Trigger)
.AddField(GetText(strs.response), .AddField(GetText(strs.response),
message.Length > 1024 ? GetText(strs.redacted_too_long) : message)); message.Length > 1024 ? GetText(strs.redacted_too_long) : message));
} }
else else
await ReplyErrorLocalizedAsync(strs.edit_fail); await ReplyErrorLocalizedAsync(strs.expr_no_found_id);
} }
[Cmd] [Cmd]
@@ -86,7 +86,7 @@ public partial class NadekoExpressions : NadekoModule<NadekoExpressionsService>
if (expressions is null || !expressions.Any()) if (expressions is null || !expressions.Any())
{ {
await ReplyErrorLocalizedAsync(strs.no_found); await ReplyErrorLocalizedAsync(strs.expr_no_found);
return; return;
} }
@@ -105,7 +105,7 @@ public partial class NadekoExpressions : NadekoModule<NadekoExpressionsService>
: " // " + string.Join(" ", ex.GetReactions()))) : " // " + string.Join(" ", ex.GetReactions())))
.Join('\n'); .Join('\n');
return _eb.Create().WithOkColor().WithTitle(GetText(strs.custom_reactions)).WithDescription(desc); return _eb.Create().WithOkColor().WithTitle(GetText(strs.expressions)).WithDescription(desc);
}, },
expressions.Length, expressions.Length,
20); 20);
@@ -118,7 +118,7 @@ public partial class NadekoExpressions : NadekoModule<NadekoExpressionsService>
if (found is null) if (found is null)
{ {
await ReplyErrorLocalizedAsync(strs.no_found_id); await ReplyErrorLocalizedAsync(strs.expr_no_found_id);
return; return;
} }
@@ -135,7 +135,7 @@ public partial class NadekoExpressions : NadekoModule<NadekoExpressionsService>
{ {
if (!AdminInGuildOrOwnerInDm()) if (!AdminInGuildOrOwnerInDm())
{ {
await ReplyErrorLocalizedAsync(strs.insuff_perms); await ReplyErrorLocalizedAsync(strs.expr_insuff_perms);
return; return;
} }
@@ -145,13 +145,13 @@ public partial class NadekoExpressions : NadekoModule<NadekoExpressionsService>
{ {
await ctx.Channel.EmbedAsync(_eb.Create() await ctx.Channel.EmbedAsync(_eb.Create()
.WithOkColor() .WithOkColor()
.WithTitle(GetText(strs.deleted)) .WithTitle(GetText(strs.expr_deleted))
.WithDescription($"#{id}") .WithDescription($"#{id}")
.AddField(GetText(strs.trigger), ex.Trigger.TrimTo(1024)) .AddField(GetText(strs.trigger), ex.Trigger.TrimTo(1024))
.AddField(GetText(strs.response), ex.Response.TrimTo(1024))); .AddField(GetText(strs.response), ex.Response.TrimTo(1024)));
} }
else else
await ReplyErrorLocalizedAsync(strs.no_found_id); await ReplyErrorLocalizedAsync(strs.expr_no_found_id);
} }
[Cmd] [Cmd]
@@ -159,21 +159,21 @@ public partial class NadekoExpressions : NadekoModule<NadekoExpressionsService>
{ {
if (!AdminInGuildOrOwnerInDm()) if (!AdminInGuildOrOwnerInDm())
{ {
await ReplyErrorLocalizedAsync(strs.insuff_perms); await ReplyErrorLocalizedAsync(strs.expr_insuff_perms);
return; return;
} }
var ex = _service.GetExpression(ctx.Guild?.Id, id); var ex = _service.GetExpression(ctx.Guild?.Id, id);
if (ex is null) if (ex is null)
{ {
await ReplyErrorLocalizedAsync(strs.no_found); await ReplyErrorLocalizedAsync(strs.expr_no_found_id);
return; return;
} }
if (emojiStrs.Length == 0) if (emojiStrs.Length == 0)
{ {
await _service.ResetExprReactions(ctx.Guild?.Id, id); await _service.ResetExprReactions(ctx.Guild?.Id, id);
await ReplyConfirmLocalizedAsync(strs.crr_reset(Format.Bold(id.ToString()))); await ReplyConfirmLocalizedAsync(strs.expr_reset(Format.Bold(id.ToString())));
return; return;
} }
@@ -204,7 +204,7 @@ public partial class NadekoExpressions : NadekoModule<NadekoExpressionsService>
await _service.SetExprReactions(ctx.Guild?.Id, id, succ); await _service.SetExprReactions(ctx.Guild?.Id, id, succ);
await ReplyConfirmLocalizedAsync(strs.crr_set(Format.Bold(id.ToString()), await ReplyConfirmLocalizedAsync(strs.expr_set(Format.Bold(id.ToString()),
succ.Select(static x => x.ToString()).Join(", "))); succ.Select(static x => x.ToString()).Join(", ")));
} }
@@ -237,14 +237,14 @@ public partial class NadekoExpressions : NadekoModule<NadekoExpressionsService>
{ {
if (!AdminInGuildOrOwnerInDm()) if (!AdminInGuildOrOwnerInDm())
{ {
await ReplyErrorLocalizedAsync(strs.insuff_perms); await ReplyErrorLocalizedAsync(strs.expr_insuff_perms);
return; return;
} }
var (success, newVal) = await _service.ToggleExprOptionAsync(id, option); var (success, newVal) = await _service.ToggleExprOptionAsync(id, option);
if (!success) if (!success)
{ {
await ReplyErrorLocalizedAsync(strs.no_found_id); await ReplyErrorLocalizedAsync(strs.expr_no_found_id);
return; return;
} }
@@ -270,7 +270,7 @@ public partial class NadekoExpressions : NadekoModule<NadekoExpressionsService>
.WithDescription("This will delete all custom reactions on this server."))) .WithDescription("This will delete all custom reactions on this server.")))
{ {
var count = _service.DeleteAllExpressions(ctx.Guild.Id); var count = _service.DeleteAllExpressions(ctx.Guild.Id);
await ReplyConfirmLocalizedAsync(strs.cleared(count)); await ReplyConfirmLocalizedAsync(strs.exprs_cleared(count));
} }
} }
@@ -279,7 +279,7 @@ public partial class NadekoExpressions : NadekoModule<NadekoExpressionsService>
{ {
if (!AdminInGuildOrOwnerInDm()) if (!AdminInGuildOrOwnerInDm())
{ {
await ReplyErrorLocalizedAsync(strs.insuff_perms); await ReplyErrorLocalizedAsync(strs.expr_insuff_perms);
return; return;
} }
@@ -298,7 +298,7 @@ public partial class NadekoExpressions : NadekoModule<NadekoExpressionsService>
{ {
if (!AdminInGuildOrOwnerInDm()) if (!AdminInGuildOrOwnerInDm())
{ {
await ReplyErrorLocalizedAsync(strs.insuff_perms); await ReplyErrorLocalizedAsync(strs.expr_insuff_perms);
return; return;
} }

View File

@@ -1,13 +1,13 @@
{ {
"deleted": "Custom Reaction deleted", "expr_deleted": "Expression deleted",
"insuff_perms": "Insufficient permissions. Requires Bot ownership for global custom reactions, and Administrator for server custom reactions.", "expr_insuff_perms": "Insufficient permissions. Requires Bot ownership for global expressions, and Administrator for server expressions.",
"custom_reactions": "Custom Reactions", "expressions": "Expressions",
"new_cust_react": "New Custom Reaction", "expr_new": "New Expression",
"no_found": "No custom reaction found.", "expr_no_found": "No expression found.",
"no_found_id": "No custom reaction found with that id.", "expr_no_found_id": "No expression found with that id.",
"cleared": "All {0} custom reactions on this server have been removed.", "exprs_cleared": "All {0} expressions on this server have been removed.",
"crr_reset": "Custom reaction with id {0} will no longer add reactions.", "expr_reset": "Expression with id {0} will no longer add reactions.",
"crr_set": "Custom reaction with id {0} will add following reactions to the response message: {1}", "expr_set": "Expression with id {0} will add following reactions to the response message: {1}",
"invalid_emojis": "All emojis you've specified are invalid.", "invalid_emojis": "All emojis you've specified are invalid.",
"invalid_emoji_link": "Specified link is either not an image or exceeds 256KB.", "invalid_emoji_link": "Specified link is either not an image or exceeds 256KB.",
"emoji_add_error": "Error adding emoji. You either ran out of emoji slots, or image size is inadequate.", "emoji_add_error": "Error adding emoji. You either ran out of emoji slots, or image size is inadequate.",
@@ -636,8 +636,8 @@
"vcrole_added": "Users who join {0} voice channel will get {1} role.", "vcrole_added": "Users who join {0} voice channel will get {1} role.",
"vcrole_removed": "Users who join {0} voice channel will no longer get a role.", "vcrole_removed": "Users who join {0} voice channel will no longer get a role.",
"vc_role_list": "Voice channel roles", "vc_role_list": "Voice channel roles",
"option_disabled": "{0} option is now disabled for custom reaction with id {1}.", "option_disabled": "{0} option is now disabled for the expression with id {1}.",
"option_enabled": "{0} option is now enabled for custom reaction with id {1}.", "option_enabled": "{0} option is now enabled for the expression with id {1}.",
"aliases_none": "No alias found", "aliases_none": "No alias found",
"alias_added": "Typing {0} will now be an alias of {1}.", "alias_added": "Typing {0} will now be an alias of {1}.",
"alias_list": "List of aliases", "alias_list": "List of aliases",
@@ -847,7 +847,7 @@
"club_apps_for": "Applicants for {0} club", "club_apps_for": "Applicants for {0} club",
"club_leaderboard": "Club leaderboard - page {0}", "club_leaderboard": "Club leaderboard - page {0}",
"template_reloaded": "Xp template has been reloaded.", "template_reloaded": "Xp template has been reloaded.",
"edited_cust_react": "Custom Reaction Edited", "expr_edited": "Expression Edited",
"self_assign_are_exclusive": "You can only choose 1 role from each group.", "self_assign_are_exclusive": "You can only choose 1 role from each group.",
"self_assign_are_not_exclusive": "You can choose any number of roles from any group.", "self_assign_are_not_exclusive": "You can choose any number of roles from any group.",
"self_assign_group": "Group {0}", "self_assign_group": "Group {0}",
@@ -870,7 +870,6 @@
"feed_no_feed": "You haven't subscribed to any feeds on this server.", "feed_no_feed": "You haven't subscribed to any feeds on this server.",
"restart_fail": "You must setup RestartCommand in your creds.yml", "restart_fail": "You must setup RestartCommand in your creds.yml",
"restarting": "Restarting.", "restarting": "Restarting.",
"edit_fail": "Custom reaction with that ID does not exist.",
"streaming": "Streaming", "streaming": "Streaming",
"rafflecur": "{0} Currency Raffle", "rafflecur": "{0} Currency Raffle",
"rafflecur_joined": "User {0} joined the raffle", "rafflecur_joined": "User {0} joined the raffle",