package util import ( "github.com/bwmarrin/discordgo" ) func HasAdmin(dg *discordgo.Session, userID string, channelID string) bool { perm, err := dg.UserChannelPermissions(userID, channelID) if err != nil { ReportError(dg, err) return false } return perm&discordgo.PermissionAdministrator != 0 }