So I recently updated my bot so it uses shards now but I'm coming across a problem where I can't react to a message as the emote isn't on the same shard and I don't know how to get it from a different shard.
let msg = await message.channel.send("hey")
async function reactEmoji(emote){
msg.react(emote)
}
client.shard.broadcastEval(`
let emote = this.emojis.cache.get("emoji id")
if(emote){
(${reactEmoji}).call(this, emote)
}
`);
So the code above is what I've already tried doing but it seems to not work, when I try to react to the message it says msg is undefined and I also tried to pass the msg with emote which didn't work either.
The other way I tried to do was reacting to a message using the emojis ID:
msg.react("emoji id")
This again had the same problem as the emoji wasn't on the same shard.
So if anyone knows a good way to do this let me know please :)