1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-12-01 11:12:48 +00:00

discord: name Member guild ID params appropriately

This commit is contained in:
twoscott 2022-07-20 01:05:52 +01:00 committed by diamondburned
parent c84e7f6712
commit fb2032d538

View file

@ -388,20 +388,20 @@ func (m Member) Mention() string {
// AvatarURL returns the URL of the Avatar Image. It automatically detects a // AvatarURL returns the URL of the Avatar Image. It automatically detects a
// suitable type. // suitable type.
func (m Member) AvatarURL(guild GuildID) string { func (m Member) AvatarURL(guildID GuildID) string {
return m.AvatarURLWithType(AutoImage, guild) return m.AvatarURLWithType(AutoImage, guildID)
} }
// AvatarURLWithType returns the URL of the Avatar Image using the passed type. // AvatarURLWithType returns the URL of the Avatar Image using the passed type.
// If the member has no Avatar, an empty string will be returned. // If the member has no Avatar, an empty string will be returned.
// //
// Supported Image Types: PNG, JPEG, WebP, GIF // Supported Image Types: PNG, JPEG, WebP, GIF
func (m Member) AvatarURLWithType(t ImageType, guild GuildID) string { func (m Member) AvatarURLWithType(t ImageType, guildID GuildID) string {
if m.Avatar == "" { if m.Avatar == "" {
return "" return ""
} }
return "https://cdn.discordapp.com/guilds/" + guild.String() + "/users/" + m.User.ID.String() + "/avatars/" + t.format(m.Avatar) return "https://cdn.discordapp.com/guilds/" + guildID.String() + "/users/" + m.User.ID.String() + "/avatars/" + t.format(m.Avatar)
} }
// https://discord.com/developers/docs/resources/guild#ban-object // https://discord.com/developers/docs/resources/guild#ban-object