From fb2032d538d344c63b353c5ba1ccf22ac6800980 Mon Sep 17 00:00:00 2001 From: twoscott Date: Wed, 20 Jul 2022 01:05:52 +0100 Subject: [PATCH] discord: name Member guild ID params appropriately --- discord/guild.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/discord/guild.go b/discord/guild.go index b7584a0..2559416 100644 --- a/discord/guild.go +++ b/discord/guild.go @@ -388,20 +388,20 @@ func (m Member) Mention() string { // AvatarURL returns the URL of the Avatar Image. It automatically detects a // suitable type. -func (m Member) AvatarURL(guild GuildID) string { - return m.AvatarURLWithType(AutoImage, guild) +func (m Member) AvatarURL(guildID GuildID) string { + return m.AvatarURLWithType(AutoImage, guildID) } // AvatarURLWithType returns the URL of the Avatar Image using the passed type. // If the member has no Avatar, an empty string will be returned. // // 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 == "" { 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