Use the everyone role to initialise the permission flags.
This commit is contained in:
parent
003454345b
commit
cd6971839a
1 changed files with 7 additions and 0 deletions
|
@ -412,6 +412,13 @@ func (s *Session) UserChannelPermissions(userID, channelID string) (apermissions
|
|||
}
|
||||
}
|
||||
|
||||
for _, role := range guild.Roles {
|
||||
if role.ID == guild.ID {
|
||||
apermissions |= role.Permissions
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
for _, role := range guild.Roles {
|
||||
for _, roleID := range member.Roles {
|
||||
if role.ID == roleID {
|
||||
|
|
Loading…
Reference in a new issue