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

Specifying flags: MessageFlags.Ephemeral in interaction responses does not update the ephemeral property on the interaction #10020

Closed
Jiralite opened this issue Dec 3, 2023 · 0 comments · Fixed by #10021

Comments

@Jiralite
Copy link
Member

Jiralite commented Dec 3, 2023

Which package is this bug report for?

discord.js

Issue description

When specifying ephemeral: true, discord.js updates the ephemeral property on the interaction:

this.ephemeral = options.ephemeral ?? false;

However, it does not account for when flags are utilised (flags: MessageFlags.Ephemeral).

In the below code sample, uncomment ephemeral: true and see the logged interaction's ephemeral property. Then, uncomment flags: MessageFlags.Ephemeral and compare the property. ephemeral: true will be logged in the first instance and ephemeral: false will be logged in the second instance.

Code sample

import { Client, Events, MessageFlags } from "discord.js";

const client = new Client({ intents: 0 });

client.on(Events.InteractionCreate, async (interaction) => {
	if (!interaction.isChatInputCommand()) return;

	await interaction.reply({
		content: "Hello world!",
		// ephemeral: true,
		// flags: MessageFlags.Ephemeral,
	});

	console.log(interaction);
});

void client.login();

Versions

discord.js 54453b0

Issue priority

Low (slightly annoying)

Which partials do you have configured?

Not applicable

Which gateway intents are you subscribing to?

Not applicable

I have tested this issue on a development release

54453b0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant