File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -19,24 +19,24 @@ export default function(queueItem: QueueItem): BotEmbed {
19
19
. setPlaceholder ( 'Select an image' )
20
20
. addOptions (
21
21
{
22
- label : 'Top Left' ,
22
+ label : '↖️ Top Left' ,
23
23
description : 'The top left image.' ,
24
- value : 'topLeft ' ,
24
+ value : '0 ' ,
25
25
} ,
26
26
{
27
- label : 'Top Right' ,
27
+ label : '↗️ Top Right' ,
28
28
description : 'The top right image.' ,
29
- value : 'topRight ' ,
29
+ value : '1 ' ,
30
30
} ,
31
31
{
32
- label : 'Bottom Left' ,
32
+ label : '↙️ Bottom Left' ,
33
33
description : 'The bottom left image.' ,
34
- value : 'bottomLeft ' ,
34
+ value : '2 ' ,
35
35
} ,
36
36
{
37
- label : 'Bottom Right' ,
37
+ label : '↘️ Bottom Right' ,
38
38
description : 'The bottom right image.' ,
39
- value : 'bottomRight ' ,
39
+ value : '3 ' ,
40
40
} ,
41
41
)
42
42
] )
Original file line number Diff line number Diff line change 1
1
import { Interaction } from "discord.js"
2
- import { isEmpty , isNil } from "ramda"
2
+ import { compose , isEmpty , isNil } from "ramda"
3
3
import { Bot } from '../bot'
4
4
import { BotEvent , QueueItem , QueueItemType } from '../types'
5
5
import imageSelectPrompt from '../embeds/imageSelectPrompt'
@@ -24,8 +24,10 @@ const botEvent: BotEvent = {
24
24
return
25
25
}
26
26
27
+ const [ selectedImage ] = interaction . values
28
+
27
29
// Ensure PNG
28
- const selectedImageB64 = `data:image/png;base64,${ referenceQueueItem . imageData [ 0 ] . toString ( 'base64' ) } `
30
+ const selectedImageB64 = `data:image/png;base64,${ referenceQueueItem . imageData [ + selectedImage ] . toString ( 'base64' ) } `
29
31
const queueItem : QueueItem = {
30
32
...referenceQueueItem ,
31
33
type : QueueItemType . Variant ,
You can’t perform that action at this time.
0 commit comments