mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 09:18:27 -04:00
fix: .translate will now use 2 embeds
This commit is contained in:
@@ -28,9 +28,19 @@ public partial class Searches
|
||||
await ctx.Channel.TriggerTypingAsync();
|
||||
var translation = await _service.Translate(fromLang, toLang, text);
|
||||
|
||||
var embed = CreateEmbed().WithOkColor().AddField(fromLang, text).AddField(toLang, translation);
|
||||
var embed = CreateEmbed()
|
||||
.WithOkColor()
|
||||
.WithTitle(fromLang)
|
||||
.WithDescription(text);
|
||||
|
||||
await Response().Embed(embed).SendAsync();
|
||||
var embed2 = CreateEmbed()
|
||||
.WithOkColor()
|
||||
.WithTitle(toLang)
|
||||
.WithDescription(translation);
|
||||
|
||||
await Response()
|
||||
.Embeds([embed, embed2])
|
||||
.SendAsync();
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -65,7 +75,10 @@ public partial class Searches
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async Task AutoTransLang(string fromLang, string toLang)
|
||||
{
|
||||
var succ = await _service.RegisterUserAsync(ctx.User.Id, ctx.Channel.Id, fromLang.ToLower(), toLang.ToLower());
|
||||
var succ = await _service.RegisterUserAsync(ctx.User.Id,
|
||||
ctx.Channel.Id,
|
||||
fromLang.ToLower(),
|
||||
toLang.ToLower());
|
||||
|
||||
if (succ is null)
|
||||
{
|
||||
|
Reference in New Issue
Block a user