client undefined

I got this code to emit a custom event in my database manager class :
        console.log(this.client); <== works
        this.client.emit('squadronPointsUpdate', {
            squadronStats: squadronStats,
            players: players,
            client: this.client
        });

It correctly logs the client in console but in my event class it logs undefined and I don't understand why

module.exports = {
    name: 'squadronPointsUpdate',
    async execute(squadronStats, players, client) {
        console.log("\n\n")
        console.log(client) <== not working "undefined"
        console.log("\n\n")
        console.log("hhhh")
    }
Was this page helpful?