BossDaily
BossDaily
Explore posts from servers
SIASapphire - Imagine a framework
Created by BossDaily on 5/17/2023 in #sapphire-support
Does .gitignore just not work?
I added the env file to my .gitignore and it literally does nothing, vscode still keeps trying to stage it and it can still be commited
8 replies
SIASapphire - Imagine a framework
Created by BossDaily on 3/17/2023 in #sapphire-support
MessageCreate Event isn't working
This is the first listener Im creating I've read the documentation 50 times imo and checked out the examples and I am still confused
import { Events, Listener } from '@sapphire/framework';
import type { Message } from 'discord.js';

export class UserEvent extends Listener<typeof Events.MessageCreate> {
public override async run(msg: Message) {
try {
this.container.logger.info(`Message sent by ${msg.author.username} in ${msg.guild?.name} (${msg.guildId})`);

} catch (error) {
this.container.logger.fatal(error);
}
}
}
import { Events, Listener } from '@sapphire/framework';
import type { Message } from 'discord.js';

export class UserEvent extends Listener<typeof Events.MessageCreate> {
public override async run(msg: Message) {
try {
this.container.logger.info(`Message sent by ${msg.author.username} in ${msg.guild?.name} (${msg.guildId})`);

} catch (error) {
this.container.logger.fatal(error);
}
}
}
12 replies