Skip to content

Webhook messages may not be only components #6358

Description

@Markus-Rost

Description

Application owned webhooks can't send messages consisting of just components. (DiscordAPIError[50006]: Cannot send an empty message)

This is in contrast to normal messages send as a bot user, which can be just a component.

The API docs also shows a note indicating just components should work, however the JSON/Form Params table only says "one of content, file, embeds". (also note it saying "file" instead of "files[n]")

Note that when sending a message, you must provide a value for at least one of content, embeds, components, or file.

Steps to Reproduce

  1. Create an application owned webhook
  2. Send a message consisting of just components like the one below:
{
    "components": [
        {
            "type": 1,
            "components": [
                {
                    "type": 2,
                    "label": "Click me!",
                    "style": 1,
                    "custom_id": "click_one"
                }
            ]

        }
    ]
}

Expected Behavior

Application owned webhooks should be able to send components only messages, the same way as normal bot users.

Current Behavior

Application owned webhooks need at least one of content, embeds or files set to send messages with components. Otherwise they get DiscordAPIError[50006]: Cannot send an empty message

{
    "content": "This is a message with components",
    "components": [
        {
            "type": 1,
            "components": [
                {
                    "type": 2,
                    "label": "Click me!",
                    "style": 1,
                    "custom_id": "click_one"
                }
            ]

        }
    ]
}

Screenshots/Videos

No response

Client and System Information

I reproduced this issue using discord.js as well sending POST requests directly through the browser.

Metadata

Metadata

Assignees

No one assigned

    Labels

    message componentsclick click click click click click clicksyncedSynced to internal tracker

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions