From 35115fd0d13b72a1d07d9cf0be4feb8160dac570 Mon Sep 17 00:00:00 2001 From: Luther Wen Xu Date: Sat, 30 May 2020 20:45:24 +0800 Subject: [PATCH] feat: Add GetAvatar helper function --- util/query.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/util/query.go b/util/query.go index f66f827..ede212c 100644 --- a/util/query.go +++ b/util/query.go @@ -11,3 +11,7 @@ func GetMember(dg *discordgo.Session, guildID string, userID string) (*discordgo } return dg.GuildMember(guildID, userID) } + +func GetAvatar(dg *discordgo.Session, user *discordgo.User) string { + return "https://cdn.discordapp.com/avatars/" + user.ID + "/" + user.Avatar + ".png" +}