feat: add embeds to messages using plaintext flag

This commit is contained in:
rladenson 2024-08-27 13:34:46 -06:00
parent 49954e32b4
commit 30fd97e083
4 changed files with 39 additions and 13 deletions

View file

@ -150,7 +150,9 @@ public class Groups
}
if (format == ReplyFormat.Plaintext)
{
await ctx.Reply(target.DisplayName);
var eb = new EmbedBuilder()
.Description($"Showing displayname for group {target.Reference(ctx)}");
await ctx.Reply(target.DisplayName, embed: eb.Build());
return;
}
@ -224,7 +226,9 @@ public class Groups
}
if (format == ReplyFormat.Plaintext)
{
await ctx.Reply(target.Description);
var eb = new EmbedBuilder()
.Description($"Showing description for group {target.Reference(ctx)}");
await ctx.Reply(target.Description, embed: eb.Build());
return;
}

View file

@ -88,7 +88,9 @@ public class MemberEdit
}
if (format == ReplyFormat.Plaintext)
{
await ctx.Reply(target.Description);
var eb = new EmbedBuilder()
.Description($"Showing description for member {target.Reference(ctx)}");
await ctx.Reply(target.Description, embed: eb.Build());
return;
}
@ -153,7 +155,9 @@ public class MemberEdit
}
if (format == ReplyFormat.Plaintext)
{
await ctx.Reply(target.Pronouns);
var eb = new EmbedBuilder()
.Description($"Showing pronouns for member {target.Reference(ctx)}");
await ctx.Reply(target.Pronouns, embed: eb.Build());
return;
}
@ -426,7 +430,9 @@ public class MemberEdit
}
if (format == ReplyFormat.Plaintext)
{
await ctx.Reply(target.DisplayName);
var eb = new EmbedBuilder()
.Description($"Showing displayname for member {target.Reference(ctx)}");
await ctx.Reply(target.DisplayName, embed: eb.Build());
return;
}
@ -500,7 +506,9 @@ public class MemberEdit
}
if (format == ReplyFormat.Plaintext)
{
await ctx.Reply(memberGuildConfig.DisplayName);
var eb = new EmbedBuilder()
.Description($"Showing servername for member {target.Reference(ctx)}");
await ctx.Reply(memberGuildConfig.DisplayName, embed: eb.Build());
return;
}

View file

@ -387,7 +387,9 @@ public class ProxiedMessage
if (format == ContextArgumentsExt.ReplyFormat.Plaintext)
{
await ctx.Reply(content);
var eb = new EmbedBuilder()
.Description($"Showing contents of message {message.Message.Mid}");
await ctx.Reply(content, embed: eb.Build());
return;
}

View file

@ -55,7 +55,9 @@ public class SystemEdit
}
if (format == ReplyFormat.Plaintext)
{
await ctx.Reply(target.Name);
var eb = new EmbedBuilder()
.Description($"Showing name for system {target.DisplayHid()}");
await ctx.Reply(target.Name, embed: eb.Build());
return;
}
@ -118,7 +120,9 @@ public class SystemEdit
}
if (format == ReplyFormat.Plaintext)
{
await ctx.Reply(settings.DisplayName);
var eb = new EmbedBuilder()
.Description($"Showing servername for system {target.DisplayHid()}");
await ctx.Reply(settings.DisplayName, embed: eb.Build());
return;
}
@ -179,7 +183,9 @@ public class SystemEdit
}
if (format == ReplyFormat.Plaintext)
{
await ctx.Reply(target.Description);
var eb = new EmbedBuilder()
.Description($"Showing description for system {target.DisplayHid()}");
await ctx.Reply(target.Description, embed: eb.Build());
return;
}
@ -293,7 +299,9 @@ public class SystemEdit
}
if (format == ReplyFormat.Plaintext)
{
await ctx.Reply(target.Tag);
var eb = new EmbedBuilder()
.Description($"Showing tag for system {target.DisplayHid()}");
await ctx.Reply(target.Tag, embed: eb.Build());
return;
}
@ -346,7 +354,9 @@ public class SystemEdit
}
if (format == ReplyFormat.Plaintext)
{
await ctx.Reply(settings.Tag);
var eb = new EmbedBuilder()
.Description($"Showing servertag for system {target.DisplayHid()}");
await ctx.Reply(settings.Tag, embed: eb.Build());
return;
}
@ -479,7 +489,9 @@ public class SystemEdit
}
if (format == ReplyFormat.Plaintext)
{
await ctx.Reply(target.Pronouns);
var eb = new EmbedBuilder()
.Description($"Showing pronouns for system {target.DisplayHid()}");
await ctx.Reply(target.Pronouns, embed: eb.Build());
return;
}