fix(interactions): incorrect call of State.Role in RoleValue (#1237)

The gID parameter was passed to State.Role as roleID
and roleID was passed as guildID.
This commits inverts the arguments order to fix the issue.
This commit is contained in:
Nils Ponsard 2022-10-07 13:21:30 +02:00 committed by GitHub
parent e57064892a
commit bd58eb717e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -472,7 +472,7 @@ func (o ApplicationCommandInteractionDataOption) RoleValue(s *Session, gID strin
return &Role{ID: roleID}
}
r, err := s.State.Role(roleID, gID)
r, err := s.State.Role(gID, roleID)
if err != nil {
roles, err := s.GuildRoles(gID)
if err == nil {