mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 10:03:31 +01:00
feat(Sharding*): contexts for broadcastEval (#5756)
* feat(ShardClientUtil): add parameterList to broadcastEval * feat(ShardingManager): add parameterList to broadcastEval * chore: update typings * refactor(Sharding*): use BroadcastEvalOptions * chore: update typings * docs: use serializable instead of stringifiable * refactor: don't set broadcastEval default context Co-authored-by: Antonio Román <kyradiscord@gmail.com> * chore: fix inaccuracy in typings * refactor(Sharding*): remove string-based broadcastEval * fix(ShardingManager): incorrect usage of _broadcastEvalRaw * refactor(ShardingManager): remove unnecessary method * refactor(Sharding*): type check the eval script * fix(ShardingManager): return Promise rejection rather than throwing an error Co-authored-by: SpaceEEC <spaceeec@yahoo.com> * chore: fix typings Co-authored-by: SpaceEEC <spaceeec@yahoo.com> Co-authored-by: Antonio Román <kyradiscord@gmail.com> Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
This commit is contained in:
@@ -348,7 +348,7 @@ class Shard extends EventEmitter {
|
||||
// Shard is requesting an eval broadcast
|
||||
if (message._sEval) {
|
||||
const resp = { _sEval: message._sEval, _sEvalShard: message._sEvalShard };
|
||||
this.manager.broadcastEval(message._sEval, message._sEvalShard).then(
|
||||
this.manager._performOnShards('eval', [message._sEval], message._sEvalShard).then(
|
||||
results => this.send({ ...resp, _result: results }),
|
||||
err => this.send({ ...resp, _error: Util.makePlainError(err) }),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user