From bd58eb717e6563cf965e9b2477d0e4ce6dc6d9d7 Mon Sep 17 00:00:00 2001 From: Nils Ponsard Date: Fri, 7 Oct 2022 13:21:30 +0200 Subject: [PATCH] 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. --- interactions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interactions.go b/interactions.go index 61a4e99..4638261 100644 --- a/interactions.go +++ b/interactions.go @@ -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 {