diff options
Diffstat (limited to 'packages/interactions/discord')
| -rw-r--r-- | packages/interactions/discord/commands/index.ts | 14 | ||||
| -rw-r--r-- | packages/interactions/discord/embeds.ts | 35 |
2 files changed, 49 insertions, 0 deletions
diff --git a/packages/interactions/discord/commands/index.ts b/packages/interactions/discord/commands/index.ts index a69e786..0a13e33 100644 --- a/packages/interactions/discord/commands/index.ts +++ b/packages/interactions/discord/commands/index.ts @@ -86,6 +86,20 @@ export const APPEAL_COMMAND: DiscordCommand = { ], }; +export const NSFW_APPLY_COMMAND: DiscordCommand = { + name: "nsfw-apply", + description: "Submit an NSFW access application to the moderators", + contexts: [0], + options: [ + { + type: 3, + name: "message", + description: "Your NSFW access application message", + required: true, + }, + ], +}; + export const COLOURS_COMMAND: DiscordCommand = { name: "colours", description: "Show the distribution of colour roles in the server", diff --git a/packages/interactions/discord/embeds.ts b/packages/interactions/discord/embeds.ts index 3f7c344..16e485e 100644 --- a/packages/interactions/discord/embeds.ts +++ b/packages/interactions/discord/embeds.ts @@ -179,3 +179,38 @@ export const createAppealEmbed = ( }, }; }; + +export const createNSFWApplicationEmbed = ( + applicationContent: string, + applicant: { username: string; id: string; avatar?: string }, + timestamp: number, + isDM: boolean = true, +): DiscordEmbed => { + return { + title: "🔞 NSFW Access Application", + description: applicationContent, + color: 0xff69b4, + fields: [ + { + name: "Applicant", + value: `${applicant.username} (${applicant.id})`, + inline: true, + }, + { + name: "Timestamp", + value: `<t:${Math.floor(timestamp / 1000)}:F>`, + inline: true, + }, + ], + thumbnail: applicant.avatar + ? { + url: `https://cdn.discordapp.com/avatars/${applicant.id}/${applicant.avatar}.png?size=256`, + } + : undefined, + footer: { + text: isDM + ? "Application submitted via DM" + : "Application submitted from server", + }, + }; +}; |