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

Method discord_get_message

components/runtime/src/extensions/discord.rs:451–471  ·  view source on GitHub ↗
(
        &self,
        (channel_id_raw, message_id_raw): (String, String),
    )

Source from the content-addressed store, hash-verified

449 }
450
451 async fn discord_get_message(
452 &self,
453 (channel_id_raw, message_id_raw): (String, String),
454 ) -> Result<Message, anyhow::Error> {
455 let rt_ctx = get_rt_ctx(&self.state);
456
457 let channel = parse_get_guild_channel(&self.state, &rt_ctx, &channel_id_raw).await?;
458 let message_id = parse_discord_id(&message_id_raw)?;
459
460 discord_request(&self.state, async move {
461 rt_ctx
462 .discord_config
463 .client
464 .message(channel.id, message_id)
465 .await
466 })
467 .await?
468 .model()
469 .await?
470 .try_into()
471 }
472
473 async fn discord_get_messages(
474 &self,

Callers

nothing calls this directly

Calls 4

get_rt_ctxFunction · 0.85
parse_get_guild_channelFunction · 0.85
parse_discord_idFunction · 0.85
discord_requestFunction · 0.85

Tested by

no test coverage detected