commands+reactrole: Ignore bot events
parent
0bd76d9c7b
commit
24a3887288
@ -0,0 +1,13 @@
|
||||
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)
|
||||
}
|
Loading…
Reference in New Issue