events not firing

i copied the listener tutorial from the docs and the event wont fire
"dependencies": {
"@sapphire/framework": "^5.2.1",
"chalk": "^5.3.0",
"discord.js": "^14.15.3",
"dotenv": "^16.4.5",
"mongoose": "^8.5.3",
"pretty-ms": "^9.1.0",
"typescript": "^5.5.4"
}
"dependencies": {
"@sapphire/framework": "^5.2.1",
"chalk": "^5.3.0",
"discord.js": "^14.15.3",
"dotenv": "^16.4.5",
"mongoose": "^8.5.3",
"pretty-ms": "^9.1.0",
"typescript": "^5.5.4"
}
import { Listener } from "@sapphire/framework";
import type { Client } from "discord.js";

export class ReadyListener extends Listener {
public constructor(
context: Listener.LoaderContext,
options: Listener.Options
) {
super(context, {
...options,
once: true,
event: "ready"
});
}

public run(client: Client) {
const { username, id } = client.user!;
this.container.logger.info(`Successfully logged in as ${username} (${id})`);
}
}
import { Listener } from "@sapphire/framework";
import type { Client } from "discord.js";

export class ReadyListener extends Listener {
public constructor(
context: Listener.LoaderContext,
options: Listener.Options
) {
super(context, {
...options,
once: true,
event: "ready"
});
}

public run(client: Client) {
const { username, id } = client.user!;
this.container.logger.info(`Successfully logged in as ${username} (${id})`);
}
}
(nothing logs to console, the bot is logged into and i can run commands)
1 Reply
Spinel
Spinel5mo ago
1. Which version of @sapphire/framework are you using? 2. What's your file/folder structure? 3. Did you use the CLI to generate your bot? 4. What's your main (CJS) or module (ESM) property in package.json 5. Are you using TypeScript? And if so, how are you compiling and running your code? That is to say, what are your build and startup scripts? - Did you remove your output folder and rebuild then try again? 6. Is your problem related to message commands? Did you add loadMessageCommandListeners to your SapphireClient options Remember that if you are new to @sapphire/framework it is important that you read the user guide.
Want results from more Discord servers?
Add your server