Please describe the problem you are having in as much detail as possible:
I am using client.shard.broadcastEval to start a function on another shard. Since yesterday / today, that throws me some errors (did not before).
Include a reproducible code sample here, if possible:
the variables are all fine and I logged them, seems to be sth with the client referring as "this" in broadcastEval. (chID is a DM channel ID, msgID is also from the DM, where the command was started)
if (!client.guilds.has(guild.id)) {
await client.shard.broadcastEval(`
if (this.guilds.has('${guild.id}')) {
bot.jumpOver = true;
this.commands.get('events').run(this, this.channels.get('${result.chID}').messages.get('${result.msgID}'), ['${action}', ${number}, [${arguments}]])
}
`);
return;
}
Error is:
[00:13:17] - error: [Shard 0] SyntaxError: Invalid or unexpected token
at Komada._eval (C:\Coding\g4m3r\node_modules\komada\node_modules\discord.js\src\client\Client.js:523:17)
at ShardClientUtil._handleMessage (C:\Coding\g4m3r\node_modules\komada\node_modules\discord.js\src\sharding\ShardClientUtil.js:108:76)
at emitTwo (events.js:125:13)
at process.emit (events.js:213:7)
at handleMessage (internal/child_process.js:753:14)
at Pipe.channel.onread (internal/child_process.js:472:11)
Further details:
i hope you realize this is for issues with the library itself, not your code errors
yes. Absolutely. Since I didn’t change the code and only did a npm update, I was expecting this to be a lib error or atleast some lib changes.
If I am wrong please tell me, I am still learning :-)
Most helpful comment
i hope you realize this is for issues with the library itself, not your code errors