Skip to content

Commit 49119a6

Browse files
committed
fix error when creating or updating global application command
1 parent fd872a1 commit 49119a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rest/applications.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func (s *applicationsImpl) GetGlobalCommands(applicationID snowflake.ID, withLoc
7070

7171
func (s *applicationsImpl) GetGlobalCommand(applicationID snowflake.ID, commandID snowflake.ID, opts ...RequestOpt) (command discord.ApplicationCommand, err error) {
7272
var unmarshalCommand discord.UnmarshalApplicationCommand
73-
err = s.client.Do(GetGlobalCommand.Compile(nil, applicationID, commandID), nil, &command, opts...)
73+
err = s.client.Do(GetGlobalCommand.Compile(nil, applicationID, commandID), nil, &unmarshalCommand, opts...)
7474
if err == nil {
7575
command = unmarshalCommand.ApplicationCommand
7676
}
@@ -79,7 +79,7 @@ func (s *applicationsImpl) GetGlobalCommand(applicationID snowflake.ID, commandI
7979

8080
func (s *applicationsImpl) CreateGlobalCommand(applicationID snowflake.ID, commandCreate discord.ApplicationCommandCreate, opts ...RequestOpt) (command discord.ApplicationCommand, err error) {
8181
var unmarshalCommand discord.UnmarshalApplicationCommand
82-
err = s.client.Do(CreateGlobalCommand.Compile(nil, applicationID), commandCreate, &command, opts...)
82+
err = s.client.Do(CreateGlobalCommand.Compile(nil, applicationID), commandCreate, &unmarshalCommand, opts...)
8383
if err == nil {
8484
command = unmarshalCommand.ApplicationCommand
8585
}

0 commit comments

Comments
 (0)