Listeners won't fire up nor slash commands would register in the guild

I created a new bot and now the listeners won't fire up although the bot seems to be online? nor the commands get registered although it shows this
4 Replies
acronie
acronie14mo ago
anyone got any idea why my listener wont fire up
import { ApplyOptions } from '@sapphire/decorators';
import { Listener } from '@sapphire/framework';
import type { GuildMember } from 'discord.js';

@ApplyOptions<Listener.Options>({})
export class UserEvent extends Listener {
public constructor(context: Listener.Context, options: Listener.Options) {
super(context, {
...options,
event: 'guildMemberAdd'
});
}
public override run(member: GuildMember) {
console.log('A new member joined', member);
}
}
import { ApplyOptions } from '@sapphire/decorators';
import { Listener } from '@sapphire/framework';
import type { GuildMember } from 'discord.js';

@ApplyOptions<Listener.Options>({})
export class UserEvent extends Listener {
public constructor(context: Listener.Context, options: Listener.Options) {
super(context, {
...options,
event: 'guildMemberAdd'
});
}
public override run(member: GuildMember) {
console.log('A new member joined', member);
}
}
just won't work? why so
Sean
Sean14mo ago
What is your main property in package.json?
acronie
acronie14mo ago
"main": "dist/index.js", used sapphire cli to build the project ready event works but not this does anyone have any idea about this So some intents were missing which you need on adding those it works
Aura
Aura14mo ago
Hi I'm having the same issue... I haven't changed anything in my index.ts or package.json etc. My debug logs just stopped saying it was registering any commands and says that it only takes 0ms to initialize... this started when I added a new command. Just realised that when I copied my old command, I didn't change it's name! <a:CL7_Facepalm:587052527065890864> Anyway, hope this helps someone in the future