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

Method discord_crosspost_message

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

Source from the content-addressed store, hash-verified

656 }
657
658 async fn discord_crosspost_message(
659 &self,
660 (channel_id_raw, message_id_raw): (String, String),
661 ) -> Result<(), anyhow::Error> {
662 let ctx = get_rt_ctx(&self.state);
663 let channel = parse_get_guild_channel(&self.state, &ctx, &channel_id_raw).await?;
664 let message_id: Id<MessageMarker> = parse_discord_id(&message_id_raw)?;
665
666 discord_request(&self.state, async move {
667 ctx.discord_config
668 .client
669 .crosspost_message(channel.id, message_id)
670 .await
671 })
672 .await?;
673
674 Ok(())
675 }
676
677 async fn discord_delete_message(&self, args: OpDeleteMessage) -> Result<(), anyhow::Error> {
678 let rt_ctx = get_rt_ctx(&self.state);

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