Skip to content

Commit 839646b

Browse files
committed
Introduce select prompt
1 parent 79eddde commit 839646b

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

src/embeds/imageSelectPrompt.ts

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import { ActionRowBuilder, EmbedBuilder, SelectMenuBuilder } from 'discord.js'
2+
import { BotEmbed, QueueItem } from '../types'
3+
4+
export default function(queueItem: QueueItem): BotEmbed {
5+
return {
6+
embeds: [
7+
new EmbedBuilder()
8+
.setColor('#6aaa64')
9+
.setTitle('Pick An Image')
10+
.setDescription('Select an image with the dropdown below.')
11+
.setTimestamp()
12+
.setImage(`attachment://stable-confusion_${queueItem.uuid}_collage.png`)
13+
],
14+
components: [
15+
new ActionRowBuilder()
16+
.addComponents([
17+
new SelectMenuBuilder()
18+
.setCustomId('image-select-prompt')
19+
.setPlaceholder('Select an image')
20+
.addOptions(
21+
{
22+
label: 'Top Left',
23+
description: 'The top left image.',
24+
value: 'topLeft',
25+
},
26+
{
27+
label: 'Top Right',
28+
description: 'The top right image.',
29+
value: 'topRight',
30+
},
31+
{
32+
label: 'Bottom Left',
33+
description: 'The bottom left image.',
34+
value: 'bottomLeft',
35+
},
36+
{
37+
label: 'Bottom Right',
38+
description: 'The bottom right image.',
39+
value: 'bottomRight',
40+
},
41+
)
42+
])
43+
]
44+
}
45+
}

0 commit comments

Comments
 (0)