MCPcopy Create free account
hub / github.com/Botloader/botloader / code

Method code

components/webapi/src/routes/ws.rs:384–397  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

382
383impl WsCloseReason {
384 fn code(&self) -> CloseCode {
385 match self {
386 WsCloseReason::ClientDisconnected => 1000,
387 WsCloseReason::InternalError => 1011,
388 WsCloseReason::JsonDecodeError => 1007,
389 WsCloseReason::JsonEncodeError => 4005,
390 WsCloseReason::BadToken => 4001,
391 WsCloseReason::NotAuthorized => 4000,
392 WsCloseReason::AuthWhenAuthorized => 4002,
393 WsCloseReason::UnknownGuild => 4003,
394 WsCloseReason::GuildMissingAccess => 4004,
395 WsCloseReason::BotRpcError => 4006,
396 }
397 }
398
399 fn description(&self) -> &'static str {
400 match self {

Callers 1

closeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected