Skip to main content

neptunium_http/endpoints/guild/
leave_guild.rs

1use bon::Builder;
2use neptunium_model::id::{Id, marker::GuildMarker};
3use reqwest::Method;
4
5use crate::{endpoints::Endpoint, request::Request};
6
7#[derive(Builder, Copy, Clone, Debug)]
8pub struct LeaveGuild {
9    pub guild_id: Id<GuildMarker>,
10}
11
12impl Endpoint for LeaveGuild {
13    type Response = ();
14
15    fn into_request(self) -> crate::request::Request {
16        Request::builder()
17            .method(Method::DELETE)
18            .path(format!("/users/@me/guilds/{}", self.guild_id))
19            .build()
20    }
21}