#[non_exhaustive]pub enum JoinError {
Dropped,
NoSender,
NoCall,
TimedOut,
Driver(ConnectionError),
Skua(Box<TrySendError<ShardRunnerMessage>>),
Twilight(SendError),
}gateway only.Expand description
Error returned when a manager or call handler is unable to send messages over Discord’s gateway.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Dropped
Request to join was dropped, cancelled, or replaced.
NoSender
No available gateway connection was provided to send voice state update messages.
NoCall
Tried to leave a Call which was not found.
TimedOut
Connection details were not received from Discord in the
time given in the Call’s configuration.
This can occur if a message is lost by the Discord client between restarts, or if Discord’s gateway believes that this bot is still in the channel it attempts to join.
Users should leave the server on the gateway before
re-attempting connection.
Driver(ConnectionError)
driver only.The driver failed to establish a voice connection.
Users should leave the server on the gateway before
re-attempting connection.
Skua(Box<TrySendError<ShardRunnerMessage>>)
skua only.skua-specific WebSocket send error.
Twilight(SendError)
twilight only.Twilight-specific WebSocket send error when a message fails to send over websocket.
Implementations§
Source§impl JoinError
impl JoinError
Sourcepub fn should_leave_server(&self) -> bool
pub fn should_leave_server(&self) -> bool
Indicates whether this failure may have left (or been caused by) Discord’s gateway state being in an inconsistent state.
Failure to leave before rejoining may cause further
timeouts.
Sourcepub fn should_reconnect_driver(&self) -> bool
Available on crate feature driver only.
pub fn should_reconnect_driver(&self) -> bool
driver only.Indicates whether this failure can be reattempted via
Driver::connect with retreived connection info.
Failure to leave before rejoining may cause further
timeouts.
Trait Implementations§
Source§impl Error for JoinError
impl Error for JoinError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<Box<TrySendError<ShardRunnerMessage>>> for JoinError
Available on crate feature skua only.
impl From<Box<TrySendError<ShardRunnerMessage>>> for JoinError
skua only.