solana
solana
SIASapphire - Imagine a framework
Created by solana on 8/15/2024 in #sapphire-support
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)
3 replies