summaryrefslogtreecommitdiff
path: root/src/discord/embeds.ts
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-09-24 02:33:56 -0700
committerFuwn <[email protected]>2025-09-24 02:33:56 -0700
commit401d1220e1a5c2f8c37f2147cc392e0cd783b76f (patch)
tree7082dbb2ac19b8337338c90e78541a44b82fbb37 /src/discord/embeds.ts
parentfeat(server): Add new colour roles (diff)
downloadumabotdiscord-401d1220e1a5c2f8c37f2147cc392e0cd783b76f.tar.xz
umabotdiscord-401d1220e1a5c2f8c37f2147cc392e0cd783b76f.zip
feat: Appeal slash command
Diffstat (limited to 'src/discord/embeds.ts')
-rw-r--r--src/discord/embeds.ts35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/discord/embeds.ts b/src/discord/embeds.ts
index 2eeb800..6873617 100644
--- a/src/discord/embeds.ts
+++ b/src/discord/embeds.ts
@@ -146,3 +146,38 @@ export const createComplaintEmbed = (
},
};
};
+
+export const createAppealEmbed = (
+ appealContent: string,
+ appellant: { username: string; id: string; avatar?: string },
+ timestamp: number,
+ isDM: boolean = true,
+): DiscordEmbed => {
+ return {
+ title: "📋 New Appeal",
+ description: appealContent,
+ color: 0x5865f2,
+ fields: [
+ {
+ name: "Appellant",
+ value: `${appellant.username} (${appellant.id})`,
+ inline: true,
+ },
+ {
+ name: "Timestamp",
+ value: `<t:${Math.floor(timestamp / 1000)}:F>`,
+ inline: true,
+ },
+ ],
+ thumbnail: appellant.avatar
+ ? {
+ url: `https://cdn.discordapp.com/avatars/${appellant.id}/${appellant.avatar}.png?size=256`,
+ }
+ : undefined,
+ footer: {
+ text: isDM
+ ? "Appeal submitted via DM"
+ : "Appeal submitted from server",
+ },
+ };
+};