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

Method handle_guild_command

components/scheduler/src/guild_handler.rs:275–291  ·  view source on GitHub ↗
(&mut self, cmd: GuildCommand)

Source from the content-addressed store, hash-verified

273 }
274
275 async fn handle_guild_command(&mut self, cmd: GuildCommand) {
276 match cmd {
277 GuildCommand::BrokerEvent(evt) => {
278 self.handle_broker_event(evt).await;
279 }
280 GuildCommand::ReloadScripts => {
281 self.reload_guild_scripts().await;
282 }
283 GuildCommand::Shutdown => {
284 panic!("shutdown should be handled by caller")
285 }
286 GuildCommand::PurgeCache => {}
287 GuildCommand::Status(resp) => {
288 let _ = resp.send(Some(self.get_status()));
289 }
290 }
291 }
292
293 fn get_status(&self) -> GuildStatus {
294 GuildStatus {

Callers 1

handle_next_actionMethod · 0.80

Calls 4

handle_broker_eventMethod · 0.80
reload_guild_scriptsMethod · 0.80
get_statusMethod · 0.80
sendMethod · 0.45

Tested by

no test coverage detected