(&mut self, cmd: GuildCommand)
| 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 { |
no test coverage detected