Skip to content

add timeout option for broadcasteval #8872

Open
@imranbarbhuiya

Description

@imranbarbhuiya

Which package is the feature request for?

discord.js

Feature

Add a timeout option in broadcasteval after which if a shard didn't respond, resolve the promise with null value or reject it.
My bot uses multiple broadcasteval and waits for one broadcast to finish before starting a new one. This works most of the time but when a shard gets respawned for some reason, it doesn't reply to the broadcast message. So the broadcast eval never resolves and all the next broadcast eval stops working.

Ideal solution or implementation

Add a timeout option to broadcastEval. When using broadcastEval, wait for the response from the shards, and if the timeout is present and the shard didn't reply before the timeout, resolve the promise with null or reject it. I would prefer resolve with null so that we get reply from other shards.

Alternative solutions or implementations

No response

Other context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions