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?
Recent Announcements
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
S-IaF
Sapphire - Imagine a Framework
Sapphire is a next-gen object-oriented Discord.js bot framework.