harmonyland / harmony

An easy to use Discord API Library for Deno.
https://harmony.mod.land
MIT License
311 stars 47 forks source link

[Bug] `ephemeral` property does not apply to responses of type `'DEFERRED_CHANNEL_MESSAGE'`. #318

Closed vxern closed 1 year ago

vxern commented 2 years ago

What's the bug? Regardless of the value of the ephemeral property, a response of type 'DEFERRED_CHANNEL_MESSAGE' will be shown to everybody.

How do we reproduce it?

  1. Create a response with type 'DEFERRED_CHANNEL_MESSAGE' and the value of ephemeral being set to true.

What should have happened? The response should have been hidden.

What is actually happening? The response is shown.

Do you have anything to tell us more about the bug? This issue is caused by this check failing:

if (isResponseMessage(data) && data.ephemeral === true)
      flags |= InteractionResponseFlags.EPHEMERAL