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

Method discord_delete_role

components/runtime/src/extensions/discord.rs:1227–1244  ·  view source on GitHub ↗
(&self, arg: String)

Source from the content-addressed store, hash-verified

1225
1226 #[allow(async_fn_in_trait)]
1227 async fn discord_delete_role(&self, arg: String) -> Result<(), anyhow::Error> {
1228 let rt_ctx = get_rt_ctx(&self.state);
1229
1230 let role_id = parse_discord_id(&arg)?;
1231
1232 discord_request(&self.state, async move {
1233 rt_ctx
1234 .discord_config
1235 .client
1236 .delete_role(rt_ctx.guild_id, role_id)
1237 .await
1238
1239 // update_role.await
1240 })
1241 .await?;
1242
1243 Ok(())
1244 }
1245
1246 async fn discord_get_emojis(&self, _arg: ()) -> Result<Vec<CustomEmoji>, anyhow::Error> {
1247 let rt_ctx = get_rt_ctx(&self.state);

Callers

nothing calls this directly

Calls 3

get_rt_ctxFunction · 0.85
parse_discord_idFunction · 0.85
discord_requestFunction · 0.85

Tested by

no test coverage detected