Create and Edit message dont have the same Mentions default values
Summary
Messages assumes different behaviour about "mentions" between create and edit routines.
Details
Using a DiscordMessageBuilder: When creating a message using DiscordChannel.CreateMessageAsync(), the message assumes Mentions.All by default on DiscordApiClient.CreateMessageAsync() (currently on line 1300). But when editing a message by DiscordMessage.ModifyAsync(), the message assumes Mentions.None on by default on DiscordApiClient.EditMessageAsync() (currently on line 1414).
This is a mitigation for an issue that arises with mentions. The reason Mentions.None is used when editing is so you don’t pseudo-mention users and roles (editing messages does not ping users, but will highlight the message)
This is a mitigation for an issue that arises with mentions. The reason Mentions.None is used when editing is so you don’t pseudo-mention users and roles (editing messages does not ping users, but will highlight the message)
but the "highlight" is gone after editing the message
What version are you using, though? And how're you going about editing messages, because I did extensive testing before opening a PR that put the nail in the coffin for mention issues.
#1054 for reference
What version are you using, though? And how're you going about editing messages, because I did extensive testing before opening a PR that put the nail in the coffin for mention issues.
I update yesterday to 4.2.0-nightly-01054 after saw the messages lossing highlight on edited messages. But its keep occuring.
Before it, I was on 4.2.0-nightly-01045 when I saw it happening for the first time.
Previous this update to 4.2.0-nightly-01045, I was using the 04.01.00, where its dont happens.
How are you going about editing these messages?
How are you going about editing these messages?
I did a simple command to reproduce this issue

[Command("TestBuildMessage")]
public async Task TestBuildMessage(CommandContext ctx, [RemainingText] string msg)
{
var b = new DiscordMessageBuilder();
b.WithContent(msg);
await ctx.Channel.SendMessageAsync(b);
}
[Command("TestEditBuildMessage")]
public async Task TestBuildMessage(CommandContext ctx, ulong msgId, [RemainingText] string msg)
{
var b = new DiscordMessageBuilder();
b.WithContent(msg);
var dMsg = await ctx.Channel.GetMessageAsync(msgId);
await dMsg.ModifyAsync(b);
}
👋🏽 Just making sure this is a nonissue before I close this