el
el
interactionCreate listener
import { Listener } from '@sapphire/framework';

export class UserEvent extends Listener {
constructor(context, options = {}) {
super(context, {
...options,
event: 'interactionCreate',
once: false
});
}

async run(interaction) {
if (interaction.isButton()) {
if (interaction.customId === "btn_reg") {

}
}
}
}
import { Listener } from '@sapphire/framework';

export class UserEvent extends Listener {
constructor(context, options = {}) {
super(context, {
...options,
event: 'interactionCreate',
once: false
});
}

async run(interaction) {
if (interaction.isButton()) {
if (interaction.customId === "btn_reg") {

}
}
}
}
i just tried to use the listener, but there is an error when trying to press the button that I gave a custom id, am I doing something that has been changed in the latest version?
13 replies