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

Method handle_ws_command_auth

components/webapi/src/routes/ws.rs:206–213  ·  view source on GitHub ↗
(&mut self, cmd: WsCommand)

Source from the content-addressed store, hash-verified

204 }
205
206 async fn handle_ws_command_auth(&mut self, cmd: WsCommand) -> WsResult {
207 match cmd {
208 WsCommand::SubscribeLogs(g) => self.subscribe_logs(g).await,
209 WsCommand::UnSubscribeLogs(g) => self.unsubscribe_logs(g).await,
210
211 WsCommand::Authorize(_) => Err(WsCloseReason::AuthWhenAuthorized),
212 }
213 }
214
215 async fn subscribe_logs(&mut self, guild_id: Id<GuildMarker>) -> WsResult {
216 if self

Callers 1

handle_ws_commandMethod · 0.80

Calls 2

subscribe_logsMethod · 0.80
unsubscribe_logsMethod · 0.80

Tested by

no test coverage detected