|
package util
|
|
|
|
import (
|
|
"github.com/bwmarrin/discordgo"
|
|
)
|
|
|
|
func GetMember(dg *discordgo.Session, guildID string, userID string) (*discordgo.Member, error) {
|
|
member, err := dg.State.Member(guildID, userID)
|
|
if err == nil {
|
|
return member, nil
|
|
}
|
|
return dg.GuildMember(guildID, userID)
|
|
}
|