Skip to content
This repository was archived by the owner on Mar 5, 2023. It is now read-only.

Commit bd58eb7

Browse files
authored
fix(interactions): incorrect call of State.Role in RoleValue (bwmarrin#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.
1 parent e570648 commit bd58eb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

interactions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ func (o ApplicationCommandInteractionDataOption) RoleValue(s *Session, gID strin
472472
return &Role{ID: roleID}
473473
}
474474

475-
r, err := s.State.Role(roleID, gID)
475+
r, err := s.State.Role(gID, roleID)
476476
if err != nil {
477477
roles, err := s.GuildRoles(gID)
478478
if err == nil {

0 commit comments

Comments
 (0)