Skip to content

Commit

Permalink
🐛 Fix: Buttons not updating
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashu11-A committed Jun 6, 2024
1 parent 9078be6 commit 3452263
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/tickets/src/class/TicketBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,12 @@ export class TicketBuilder {
const message = await channel.messages.fetch(ticketData.messageId).catch(() => null)
if (message === null) { await new Error({ element: ticketData.messageId, interaction: this.interaction }).notFound({ type: 'Message' }).reply(); return }

if (this.embed === undefined) this.render()
if (this.embed === undefined || this.buttons === undefined) this.render()
const embed = this.embed as EmbedBuilder

await ticket.update({ id }, { ...this.options })
await (channel as TextChannel).edit({ permissionOverwrites: this.permissions() })
await message.edit({ embeds: [embed] })
await message.edit({ embeds: [embed], components: buttons })
return this
}
}

0 comments on commit 3452263

Please sign in to comment.