Milen/util/query.go

14 lines
289 B
Go

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)
}