mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 01:38:27 -04:00
Changed (almost) all responses to make them use the new system instead of raw strings
- Fixed many invalid string keys
This commit is contained in:
@@ -81,7 +81,7 @@ namespace NadekoBot.Modules.Utility
|
||||
|
||||
int i = 0;
|
||||
if (arr.Length == 0)
|
||||
await ReplyErrorLocalizedAsync("nobody_playing_game").ConfigureAwait(false);
|
||||
await ReplyErrorLocalizedAsync(strs.nobody_playing_game).ConfigureAwait(false);
|
||||
else
|
||||
{
|
||||
await SendConfirmAsync("```css\n" + string.Join("\n", arr.GroupBy(item => (i++) / 2)
|
||||
@@ -117,7 +117,7 @@ namespace NadekoBot.Modules.Utility
|
||||
return _eb.Create().WithOkColor().WithDescription(GetText(strs.no_user_on_this_page));
|
||||
|
||||
return _eb.Create().WithOkColor()
|
||||
.WithTitle(GetText(strs.inrole_list(Format.Bold(role?.Name ?? "No Role")) + $" - {roleUsers.Length}"))
|
||||
.WithTitle(GetText(strs.inrole_list(Format.Bold(role?.Name ?? "No Role") + $" - {roleUsers.Length}")))
|
||||
.WithDescription(string.Join("\n", pageUsers));
|
||||
}, roleUsers.Length, 20).ConfigureAwait(false);
|
||||
}
|
||||
@@ -151,31 +151,29 @@ namespace NadekoBot.Modules.Utility
|
||||
public async Task UserId([Leftover] IGuildUser target = null)
|
||||
{
|
||||
var usr = target ?? ctx.User;
|
||||
await ReplyConfirmLocalizedAsync("userid", "🆔", Format.Bold(usr.ToString()),
|
||||
Format.Code(usr.Id.ToString())).ConfigureAwait(false);
|
||||
await ReplyConfirmLocalizedAsync(strs.userid("🆔", Format.Bold(usr.ToString()),
|
||||
Format.Code(usr.Id.ToString())));
|
||||
}
|
||||
|
||||
[NadekoCommand, Aliases]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async Task RoleId([Leftover] IRole role)
|
||||
{
|
||||
await ReplyConfirmLocalizedAsync("roleid", "🆔", Format.Bold(role.ToString()),
|
||||
Format.Code(role.Id.ToString())).ConfigureAwait(false);
|
||||
await ReplyConfirmLocalizedAsync(strs.roleid("🆔", Format.Bold(role.ToString()),
|
||||
Format.Code(role.Id.ToString())));
|
||||
}
|
||||
|
||||
[NadekoCommand, Aliases]
|
||||
public async Task ChannelId()
|
||||
{
|
||||
await ReplyConfirmLocalizedAsync("channelid", "🆔", Format.Code(ctx.Channel.Id.ToString()))
|
||||
.ConfigureAwait(false);
|
||||
await ReplyConfirmLocalizedAsync(strs.channelid("🆔", Format.Code(ctx.Channel.Id.ToString())));
|
||||
}
|
||||
|
||||
[NadekoCommand, Aliases]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async Task ServerId()
|
||||
{
|
||||
await ReplyConfirmLocalizedAsync("serverid", "🆔", Format.Code(ctx.Guild.Id.ToString()))
|
||||
.ConfigureAwait(false);
|
||||
await ReplyConfirmLocalizedAsync(strs.serverid("🆔", Format.Code(ctx.Guild.Id.ToString())));
|
||||
}
|
||||
|
||||
[NadekoCommand, Aliases]
|
||||
@@ -194,7 +192,7 @@ namespace NadekoBot.Modules.Utility
|
||||
var roles = target.GetRoles().Except(new[] { guild.EveryoneRole }).OrderBy(r => -r.Position).Skip((page - 1) * rolesPerPage).Take(rolesPerPage).ToArray();
|
||||
if (!roles.Any())
|
||||
{
|
||||
await ReplyErrorLocalizedAsync("no_roles_on_page").ConfigureAwait(false);
|
||||
await ReplyErrorLocalizedAsync(strs.no_roles_on_page).ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -208,7 +206,7 @@ namespace NadekoBot.Modules.Utility
|
||||
var roles = guild.Roles.Except(new[] { guild.EveryoneRole }).OrderBy(r => -r.Position).Skip((page - 1) * rolesPerPage).Take(rolesPerPage).ToArray();
|
||||
if (!roles.Any())
|
||||
{
|
||||
await ReplyErrorLocalizedAsync("no_roles_on_page").ConfigureAwait(false);
|
||||
await ReplyErrorLocalizedAsync(strs.no_roles_on_page).ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -232,7 +230,7 @@ namespace NadekoBot.Modules.Utility
|
||||
|
||||
var topic = channel.Topic;
|
||||
if (string.IsNullOrWhiteSpace(topic))
|
||||
await ReplyErrorLocalizedAsync("no_topic_set").ConfigureAwait(false);
|
||||
await ReplyErrorLocalizedAsync(strs.no_topic_set).ConfigureAwait(false);
|
||||
else
|
||||
await SendConfirmAsync(GetText(strs.channel_topic), topic).ConfigureAwait(false);
|
||||
}
|
||||
@@ -272,7 +270,7 @@ namespace NadekoBot.Modules.Utility
|
||||
var result = string.Join("\n", tags.Select(m => GetText(strs.showemojis(m, m.Url))));
|
||||
|
||||
if (string.IsNullOrWhiteSpace(result))
|
||||
await ReplyErrorLocalizedAsync("showemojis_none").ConfigureAwait(false);
|
||||
await ReplyErrorLocalizedAsync(strs.showemojis_none).ConfigureAwait(false);
|
||||
else
|
||||
await ctx.Channel.SendMessageAsync(result.TrimTo(2000)).ConfigureAwait(false);
|
||||
}
|
||||
@@ -290,7 +288,7 @@ namespace NadekoBot.Modules.Utility
|
||||
|
||||
if (!guilds.Any())
|
||||
{
|
||||
await ReplyErrorLocalizedAsync("listservers_none").ConfigureAwait(false);
|
||||
await ReplyErrorLocalizedAsync(strs.listservers_none).ConfigureAwait(false);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -382,7 +380,7 @@ namespace NadekoBot.Modules.Utility
|
||||
// {
|
||||
// if (_inviteService.TryGetInvite(type, out var code))
|
||||
// {
|
||||
// await ReplyConfirmLocalizedAsync("your_invite", $"https://discord.gg/{code}");
|
||||
// await ReplyErrorLocalizedAsync(strs.your_invite($"https://discord.gg/{code}"));
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
|
Reference in New Issue
Block a user