concord 2.4.7

A terminal user interface client for Discord
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::Result;
use crate::discord::ids::{Id, marker::GuildMarker};

use super::DiscordRest;

impl DiscordRest {
    pub async fn leave_guild(&self, guild_id: Id<GuildMarker>) -> Result<()> {
        self.send_unit(
            self.raw_http.delete(format!(
                "https://discord.com/api/v9/users/@me/guilds/{}",
                guild_id.get()
            )),
            "leave guild",
        )
        .await
    }
}