sync static method
Syncs the vanity invite for the Guild.
VanityInvite? invite = await VanityInvite.sync(guild);
Implementation
static Future<VanityInvite?> sync(Snowflake guildId) async {
Response response = await ioc.use<DiscordApiHttpService>().get(url: "/guilds/$guildId/vanity-url").build();
if(response.statusCode != 200) {
return null;
}
return VanityInvite.from(jsonDecode(response.body));
}