public static async Task <DiscordBan> GetGuildBanAsync(this DiscordClient client, ulong guildId, ulong userId) { DiscordBan ban = (await client.HttpClient.GetAsync($"/guilds/{guildId}/bans/{userId}")) .Deserialize <DiscordBan>().SetClient(client); ban.GuildId = guildId; return(ban); }
/// <summary> /// Gets a guild's banned user /// </summary> /// <param name="guildId">ID of the guild</param> /// <param name="userId">ID of the user</param> /// <returns></returns> public static DiscordBan GetGuildBan(this DiscordClient client, ulong guildId, ulong userId) { DiscordBan ban = client.HttpClient.Get($"/guilds/{guildId}/bans/{userId}") .Deserialize <DiscordBan>().SetClient(client); ban.GuildId = guildId; return(ban); }