✞
Buttons Interactions
mybad
72 replies
Buttons Interactions
seems like my embed chages status
72 replies
Buttons Interactions
Hmm
72 replies
Buttons Interactions
jda.button(label = "Hit", style = ButtonStyle.SUCCESS, user = user) { buttonHit -> } do something with buttonHit
72 replies
Buttons Interactions
let me show you in koltin
72 replies
Buttons Interactions
well
72 replies
Buttons Interactions
How can I get the callbacks instead of doing the class interaction?
72 replies
Buttons Interactions
I don't know what I'm doing because I need to use 2 classes
72 replies
Buttons Interactions
I have no idea hwo to use it
72 replies
Buttons Interactions
this ain't working
72 replies
Buttons Interactions
const { InteractionHandler, InteractionHandlerTypes } = require('@sapphire/framework');
const BlackjackCommand = require('../commands/games/BlackjackCommand');

class BlackjackInteraction extends InteractionHandler {
constructor(ctx, options) {
super(ctx, {
...options,
interactionHandlerType: InteractionHandlerTypes.Button,
});
this.game = BlackjackCommand.bj;
}

parse(interaction) {
if (interaction.customId !== 'hit' && interaction.customId !== 'stand') return this.none();

return this.some();
}

async run(interaction) {
if (interaction.customId === 'hit') {
this.game.hit();
await interaction.reply('You hit!');
}
else if (interaction.customId === 'stand') {
this.game.stand();
await interaction.reply('You stand!');
}
}
}

module.exports = {
BlackjackInteraction,
};
const { InteractionHandler, InteractionHandlerTypes } = require('@sapphire/framework');
const BlackjackCommand = require('../commands/games/BlackjackCommand');

class BlackjackInteraction extends InteractionHandler {
constructor(ctx, options) {
super(ctx, {
...options,
interactionHandlerType: InteractionHandlerTypes.Button,
});
this.game = BlackjackCommand.bj;
}

parse(interaction) {
if (interaction.customId !== 'hit' && interaction.customId !== 'stand') return this.none();

return this.some();
}

async run(interaction) {
if (interaction.customId === 'hit') {
this.game.hit();
await interaction.reply('You hit!');
}
else if (interaction.customId === 'stand') {
this.game.stand();
await interaction.reply('You stand!');
}
}
}

module.exports = {
BlackjackInteraction,
};
72 replies
Buttons Interactions
Uhm I need some help
72 replies
Buttons Interactions
alright thanks I will let you know!
72 replies