feat(bot): port message info embeds to cv2
Some checks are pending
Build and push Docker image / .net docker build (push) Waiting to run
.net checks / run .net tests (push) Waiting to run
.net checks / dotnet-format (push) Waiting to run

This commit is contained in:
asleepyskye 2025-10-24 10:23:38 -04:00
parent 14f11bd1e9
commit 83f2d33c3d
7 changed files with 312 additions and 31 deletions

View file

@ -43,11 +43,10 @@ public class ApplicationCommandProxiedMessage
if (channel == null)
showContent = false;
var embeds = new List<Embed>();
var components = new List<MessageComponent>();
var guild = await _cache.GetGuild(ctx.GuildId);
if (msg.Member != null)
embeds.Add(await _embeds.CreateMemberEmbed(
components.AddRange(await _embeds.CreateMemberMessageComponents(
msg.System,
msg.Member,
guild,
@ -55,10 +54,12 @@ public class ApplicationCommandProxiedMessage
LookupContext.ByNonOwner,
DateTimeZone.Utc
));
embeds.Add(await _embeds.CreateMessageInfoEmbed(msg, showContent, ctx.Config));
await ctx.Reply(embeds: embeds.ToArray());
components.Add(new MessageComponent()
{
Type = ComponentType.Separator
});
components.AddRange(await _embeds.CreateMessageInfoMessageComponents(msg, showContent, ctx.Config));
await ctx.Reply(components: components.ToArray());
}
private async Task QueryCommandMessage(InteractionContext ctx)
@ -68,11 +69,7 @@ public class ApplicationCommandProxiedMessage
if (msg == null)
throw Errors.MessageNotFound(messageId);
var embeds = new List<Embed>();
embeds.Add(await _embeds.CreateCommandMessageInfoEmbed(msg, true));
await ctx.Reply(embeds: embeds.ToArray());
await ctx.Reply(components: await _embeds.CreateCommandMessageInfoMessageComponents(msg, true));
}
public async Task DeleteMessage(InteractionContext ctx)