Added full list of supported languages for .trans command, improved .translangs output

This commit is contained in:
Kwoth
2023-01-20 05:28:13 +01:00
parent 710f4f2ed8
commit e52bf798cf
4 changed files with 174 additions and 155 deletions

View File

@@ -77,6 +77,19 @@ public partial class Searches
[Cmd]
[RequireContext(ContextType.Guild)]
public async Task Translangs()
=> await ctx.Channel.SendTableAsync(_service.GetLanguages(), str => $"{str,-15}");
{
var langs = _service.GetLanguages().ToList();
var eb = _eb.Create()
.WithTitle($"Supported {prefix}translate Languages")
.WithOkColor();
foreach (var chunk in langs.Chunk(15))
{
eb.AddField("󠀁", chunk.Join("\n"), isInline: true);
}
await ctx.Channel.EmbedAsync(eb);
}
}
}