Skip to content

Commit 03a8f15

Browse files
committed
Fix image select timeout bug
1 parent a34e7ac commit 03a8f15

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

src/embeds/imageSelectPrompt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default function(queueItem: QueueItem): BotEmbed {
77
new EmbedBuilder()
88
.setColor('#6aaa64')
99
.setTitle('Pick An Image')
10-
.setDescription('Select an image with the dropdown below.\n\nClick the dropdown and wait a second or two before selecting your choice. If you see `Interaction Failed` after waiting, this is a bug and can be ignored.')
10+
.setDescription('Select an image with the dropdown below.')
1111
.setTimestamp()
1212
.setImage(`attachment://stable-confusion_${queueItem.uuid}_collage.png`)
1313
],

src/events/buttonImagineUpscale.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ const botEvent: BotEvent = {
4949
return
5050
}
5151

52+
await interaction.deferUpdate() // We defer the update here because we'll update the queueItem interaction instead.
53+
5254
const imageSelectPromptEmbed = imageSelectPrompt({...referenceQueueItem, type: QueueItemType.Upscaled})
5355

5456
await referenceQueueItem.interaction.editReply({

src/events/buttonImagineVariantOf.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ const botEvent: BotEvent = {
7777
return
7878
}
7979

80+
await interaction.deferUpdate() // We defer the update here because we'll update the queueItem interaction instead.
81+
8082
const imageSelectPromptEmbed = imageSelectPrompt({...referenceQueueItem, type: QueueItemType.Variant})
8183

8284
await referenceQueueItem.interaction.editReply({

0 commit comments

Comments
 (0)