export class MyService {
constructor(@Inject('client') client: Client) {
this.client = client;
this.client.on('interactionCreate', this.onInteraction.bind(this));
}
async onInteraction(interaction: BaseInteraction) {
if (!interaction.isCommand()) return;
await interaction.deferReply({ ephemeral: true });
await this.serviceCommanbds.execute(interaction);
}
}
export class MyService {
constructor(@Inject('client') client: Client) {
this.client = client;
this.client.on('interactionCreate', this.onInteraction.bind(this));
}
async onInteraction(interaction: BaseInteraction) {
if (!interaction.isCommand()) return;
await interaction.deferReply({ ephemeral: true });
await this.serviceCommanbds.execute(interaction);
}
}