at0moncord
at0moncord
SIASapphire - Imagine a framework
Created by at0moncord on 7/18/2023 in #sapphire-support
guildMemberUpdate event
I'm trying to create a listener for the guildMemberUpdate event, and sapphire registers this listener, but the run is never executed Code:
import { Listener } from '@sapphire/framework';
import type {GuildMember} from "discord.js";

export class GuildMemberUpdateListener extends Listener {
public constructor(context: Listener.Context, options: Listener.Options) {
super(context, {
...options,
once: true,
event: 'guildMemberUpdate'
});
}

public run(oldMember: GuildMember, newMember: GuildMember) {
console.log("Old member:" + oldMember);
console.log("New member:" + newMember);
}
}
import { Listener } from '@sapphire/framework';
import type {GuildMember} from "discord.js";

export class GuildMemberUpdateListener extends Listener {
public constructor(context: Listener.Context, options: Listener.Options) {
super(context, {
...options,
once: true,
event: 'guildMemberUpdate'
});
}

public run(oldMember: GuildMember, newMember: GuildMember) {
console.log("Old member:" + oldMember);
console.log("New member:" + newMember);
}
}
10 replies