Hello im traying to make a coinflip game which is simple, but I need to pass some data to the button handler and I'm not sure how to do it, and I even need to send and embed to an other channel and interact with 3 differents button which modify the embeds in different ways, if someone can answer all of that I will be happy where some code if something is wrong let me know.
export class GameCoinFlipButton extends InteractionHandler { public constructor(ctx: InteractionHandler.LoaderContext, options: InteractionHandler.Options) { super(ctx, { ...options, interactionHandlerType: InteractionHandlerTypes.Button }); } public override parse(interaction: ButtonInteraction) { if (interaction.customId !== 'confirm') return this.none(); return this.some(); } public async run(interaction: ButtonInteraction) { // edit current the message const newEmbed = successEmbed(`${knowIcon} Coin Flip Confirmed`, `The coin flip has been created. Please wait for someone to join.`); await interaction.update({ embeds: [newEmbed], components: [] }); // create a new message const embed = createEmbed(`${knowIcon} Coin Flip Created`, `${gemsIcon} **Gems Amount:** ...\n`); }}
export class GameCoinFlipButton extends InteractionHandler { public constructor(ctx: InteractionHandler.LoaderContext, options: InteractionHandler.Options) { super(ctx, { ...options, interactionHandlerType: InteractionHandlerTypes.Button }); } public override parse(interaction: ButtonInteraction) { if (interaction.customId !== 'confirm') return this.none(); return this.some(); } public async run(interaction: ButtonInteraction) { // edit current the message const newEmbed = successEmbed(`${knowIcon} Coin Flip Confirmed`, `The coin flip has been created. Please wait for someone to join.`); await interaction.update({ embeds: [newEmbed], components: [] }); // create a new message const embed = createEmbed(`${knowIcon} Coin Flip Created`, `${gemsIcon} **Gems Amount:** ...\n`); }}