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

Replying to an embed suppressed message suppresses embeds from the reply as well #7818

Closed
0x464e opened this issue Apr 19, 2022 · 3 comments
Closed

Comments

@0x464e
Copy link

0x464e commented Apr 19, 2022

Which package is this bug report for?

discord.js

Issue description

So, if you suppress embeds from a message, and then reply to that message with msg.reply() embeds will also be suppressed from your reply message.
This is obviously not the desired behavior.

In my sample code I send and suppress a message with the bot, but you can just as well manually suppress a message with your Discord client and then fetch that message and try to reply to it. The embed still wont work.

Click to see an image of the unwanted behavior

If it's hard to see what's going on in that image, the bot replies to its own message with an empty message (the empty message should contain an embed)
Also, I have no idea why it worked once there in-between.

I'd be happy to try to fix this myself, but I would need some guidance as to where I should look for the issue/what I should try to look for.

Code sample

const { Intents, Client } = require('discord.js');
const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES] });

client.on('messageCreate', async msg => {
    if (msg.content === 'test')
    {
        let sent_msg = await msg.channel.send('a message');
        await sent_msg.suppressEmbeds();
        await sent_msg.reply({ embeds: [{ description: 'test'}] });
    }
});

client.login('token').catch(console.error);

Package version

discord.js@13.6.0

Node.js version

v17.4.0

Operating system

No response

Priority this issue should have

Medium (should be fixed soon)

Which partials do you have configured?

No Partials

Which gateway intents are you subscribing to?

Guilds, GuildMessages

I have tested this issue on a development release

No response

@newracket
Copy link
Contributor

I was able to reproduce this on discord.js version 13.6.0 but not on the newest development version. Could you try to reproduce it on the latest development release? It may have already been fixed.

@Jiralite
Copy link
Member

Jiralite commented Apr 20, 2022

This is indeed fixed in main and is planned to be released in 13.7 - here are the relevant pull requests:

@0x464e
Copy link
Author

0x464e commented Apr 20, 2022

Ah nice, good to hear it's fixed. I tried to search but I guess my search my queries insufficient.
I'll close this issue.

Side question: can I see from somewhere when 13.7 is planned to be released?
I'm wondering if I should wait for the release or run my bot on the dev branch for now.

@0x464e 0x464e closed this as completed Apr 20, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants