Skip to content

Commit 51b5419

Browse files
committed
feat: QoL expire timer for crowdin verify embed, update modrinth verify embed
1 parent 82fb1d1 commit 51b5419

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/commands/verify.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ export const verifyCommand: ChatInputCommand = {
2424
const token = await createVerificationState(interaction.user.id)
2525
const url = `${base}/crowdin/verify?token=${encodeURIComponent(token)}`
2626

27+
const expireAt = Math.floor(Date.now() / 1000) + 15 * 60 // now + 15 minutes
28+
2729
const embed = new EmbedBuilder()
2830
.setColor(0x1bd96a)
2931
.setTitle('Link your Crowdin account')
@@ -34,9 +36,10 @@ export const verifyCommand: ChatInputCommand = {
3436
'To continue, please click the link down below.',
3537
' ',
3638
`**[[Click here to continue →]](${url})**`,
39+
' ',
40+
`-# This link will expire <t:${expireAt}:R>`,
3741
].join('\n'),
3842
)
39-
.setFooter({ text: 'This link will expire in 15 minutes' })
4043

4144
await interaction.reply({
4245
embeds: [embed],
@@ -51,8 +54,19 @@ export const verifyCommand: ChatInputCommand = {
5154
// content: `To link your Modrinth account, open: ${url}\nThis link expires in 15 minutes.`,
5255
// ephemeral: true,
5356
// })
57+
const embed = new EmbedBuilder()
58+
.setColor(0x1bd96a)
59+
.setTitle('Link your Modrinth account')
60+
.setDescription(
61+
[
62+
'Modrinth account verification is coming soon!',
63+
' ',
64+
"We'll let you know when it's ready.",
65+
].join('\n'),
66+
)
67+
5468
await interaction.reply({
55-
content: `Modrinth verification is coming soon! We'll let you know when it's ready.`,
69+
embeds: [embed],
5670
flags: 'Ephemeral',
5771
})
5872
return

0 commit comments

Comments
 (0)