1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use crate::{client::Client, request::Request, response::ResponseFuture, routing::Route};
use twilight_model::{guild::VanityUrl, id::GuildId};
pub struct GetGuildVanityUrl<'a> {
guild_id: GuildId,
http: &'a Client,
}
impl<'a> GetGuildVanityUrl<'a> {
pub(crate) const fn new(http: &'a Client, guild_id: GuildId) -> Self {
Self { guild_id, http }
}
pub fn exec(self) -> ResponseFuture<VanityUrl> {
let request = Request::from_route(&Route::GetGuildVanityUrl {
guild_id: self.guild_id.0,
});
self.http.request(request)
}
}