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

Method discord_add_thread_member

components/runtime/src/extensions/discord.rs:862–881  ·  view source on GitHub ↗
(
        &self,
        (channel_id_raw, user_id_raw): (String, String),
    )

Source from the content-addressed store, hash-verified

860 }
861
862 async fn discord_add_thread_member(
863 &self,
864 (channel_id_raw, user_id_raw): (String, String),
865 ) -> Result<(), anyhow::Error> {
866 let rt_ctx = get_rt_ctx(&self.state);
867
868 let channel = parse_get_guild_channel(&self.state, &rt_ctx, &channel_id_raw).await?;
869 let user_id: Id<UserMarker> = parse_discord_id(&user_id_raw)?;
870
871 discord_request(&self.state, async move {
872 rt_ctx
873 .discord_config
874 .client
875 .add_thread_member(channel.id, user_id)
876 .await
877 })
878 .await?;
879
880 Ok(())
881 }
882
883 async fn discord_remove_thread_member(
884 &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