Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embeds do not show when using webhooks with ephemeral messages #2309

Closed
rxdn opened this issue Dec 15, 2020 · 7 comments
Closed

Embeds do not show when using webhooks with ephemeral messages #2309

rxdn opened this issue Dec 15, 2020 · 7 comments
Labels

Comments

@rxdn
Copy link

rxdn commented Dec 15, 2020

Description

When using responding to slash commands with an ACK (or ACK with source) and using a webhook with the interaction's token to respond, embeds are ignored by the API if the ephemeral message flag is set. If the flag is not set, embeds work fine.

Steps to Reproduce

POST to https://discord.com/api/v8/webhooks/{bot_id}/{interaction_token} with

{
	"flags": 64,
	"embeds": [{
		"title": "hello",
		"description": "Test"
	}]
}

Expected Behavior

Embeds are not ignored by the API when using ephemeral messages

Current Behavior

The API responds with a HTTP 200 and a valid message object, but with "embeds": []. The message is shown as a blank message by the client, see the next section.

Screenshots/Videos

Screenshot of message shown in client

Client and System Information

N/A, curl can be used to reproduce

@rxdn rxdn added the bug label Dec 15, 2020
@A5rocks
Copy link
Contributor

A5rocks commented Dec 15, 2020

#2295 (comment) might be relevant here.

@rxdn
Copy link
Author

rxdn commented Dec 15, 2020

#2295 (comment) might be relevant here.

Don't think so, since the API returns a message object without embeds, it's not just the client not rendering them

@muddyfish
Copy link
Contributor

As far as I'm aware, not being able to use embeds or attachments is intended

@rxdn
Copy link
Author

rxdn commented Dec 15, 2020

As far as I'm aware, not being able to use embeds or attachments is intended

The docs for InteractionApplicationCommandCallbackData have an embeds field defined. I haven't tested what happens when you respond directly with a ChannelMessage interaction response that contains embeds yet, but I'd assume if they work with them, they'd work with webhooks. I'll test and get back to you on that

@muddyfish
Copy link
Contributor

I meant with ephemeral messages specifically. I remember someone saying they skipped out all the infrastructure that renders embeds/saves attachments and ships the message directly to the client

@rxdn
Copy link
Author

rxdn commented Dec 15, 2020

I meant with ephemeral messages specifically. I remember someone saying they skipped out all the infrastructure that renders embeds/saves attachments and ships the message directly to the client

Hmm ok, just confirmed same happens when you use the ChannelMessage response. I understand why attachments wouldn't be supported (they aren't documented under the callback data structure, unlike embeds), but since embeds are rendered by the client I don't see why they wouldn't be supported

Nvm, this is the case

@night
Copy link
Member

night commented Dec 16, 2020

This behavior is working as intended at present, as embeds go through a separate workflow ephemeral messages do not have the capability to (these are messages which are not persisted). You can voice your support for this at #2318

@night night closed this as completed Dec 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants