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

Method discord_get_guild

components/runtime/src/extensions/discord.rs:437–449  ·  view source on GitHub ↗
(&self, _arg: ())

Source from the content-addressed store, hash-verified

435
436impl EasyOpsHandlerASync for EasyOpsHandler {
437 async fn discord_get_guild(&self, _arg: ()) -> Result<Guild, anyhow::Error> {
438 let rt_ctx = get_rt_ctx(&self.state);
439
440 match rt_ctx
441 .bot_state
442 .get_guild(rt_ctx.guild_id)
443 .map_err(|err| anyhow::anyhow!("error calling state api: {}", err))
444 .await?
445 {
446 Some(c) => Ok(c.into()),
447 None => Err(anyhow::anyhow!("guild not in state")),
448 }
449 }
450
451 async fn discord_get_message(
452 &self,

Callers

nothing calls this directly

Calls 2

get_rt_ctxFunction · 0.85
get_guildMethod · 0.80

Tested by

no test coverage detected