Skip to content

applications/${appId}/commands PUT or GET return empty object #7615

Closed
@khteh

Description

@khteh

Description

https://discord.com/developers/docs/quick-start/getting-started#installing-slash-commands
https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands
https://github.com/discord/discord-example-app/blob/main/utils.js

    commands = await DiscordRequest(endpoint, { method: 'PUT', body: commands });
    console.log(`commands: ${JSON.stringify(commands, null, 2)}`)

It returns an empty object

Steps to Reproduce

https://github.com/discord/discord-example-app/blob/main/utils.js

    commands = await DiscordRequest(endpoint, { method: 'PUT', body: commands });
    console.log(`commands: ${JSON.stringify(commands, null, 2)}`)

Expected Behavior

Returns the list of commands registered

Current Behavior

Returns empty object:

$ n run register

> discord-getting-started@1.0.0 register
> node commands.js

commands: {}

Screenshots/Videos

No response

Client and System Information

Ubuntu 25.04
node v23.11.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions