HaruAjsuru
Explore posts from serversDIAdiscord.js - Imagine an app
•Created by HaruAjsuru on 11/6/2023 in #djs-questions
Fetch user from different shard (without being in the same guild)
I'm working on a notification function to send DM user . But I read some information online that using
.broadcastEval()
may result in multiple messages will be send if that user is currently in cache of multiple shards.
So in my current implementation, I'm using cron job running on shard manager to check when to send user a DM and picking random shard to send it like this:
Code in shard manager
Code in client
but my bot is still in development and don't have enough user to spawn multiple shards yet, so I have no way to test if my shard can fetch and DM that user without being in the same guild as them8 replies