Skip to content

Commit eb0c728

Browse files
committed
feat: prettier crowdin verify embed
1 parent 377a55d commit eb0c728

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

.env.example

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ EMBED_FOOTER_ICON_URL=
1515
EMBED_THUMBNAIL_URL=
1616
EMBED_TIMESTAMP=false
1717

18-
# Guilds
19-
GUILD_ID=
20-
2118
# Channels
2219
COMMUNITY_SUPPORT_FORUM_ID=1194455551212527696
2320

@@ -28,7 +25,6 @@ TRANSLATOR_ROLE_ID=
2825
VERIFIED_CREATOR_ROLE_ID=
2926
PROOFREADER_ROLE_ID=
3027

31-
3228
# Tags
3329
COMMUNITY_SUPPORT_FORUM_SOLVED_TAG_ID=1200218987125014659
3430

src/commands/verify.ts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { SlashCommandBuilder } from 'discord.js'
1+
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js'
22

33
import type { ChatInputCommand } from '@/types/commands'
44
import { createVerificationState } from '@/web'
@@ -23,8 +23,23 @@ export const verifyCommand: ChatInputCommand = {
2323
if (sub === 'crowdin') {
2424
const token = await createVerificationState(interaction.user.id)
2525
const url = `${base}/crowdin/verify?token=${encodeURIComponent(token)}`
26+
27+
const embed = new EmbedBuilder()
28+
.setColor(0x1bd96a)
29+
.setTitle('Link your Crowdin account')
30+
.setDescription(
31+
[
32+
'We need to verify your Crowdin account to link it with your Discord.',
33+
' ',
34+
'To continue, please click the link down below.',
35+
' ',
36+
url,
37+
].join('\n'),
38+
)
39+
.setFooter({ text: 'This link will expire in 15 minutes' })
40+
2641
await interaction.reply({
27-
content: `To link your Crowdin account, open: ${url}\nThis link expires in 15 minutes.`,
42+
embeds: [embed],
2843
flags: 'Ephemeral',
2944
})
3045
return

0 commit comments

Comments
 (0)