mirror of
https://github.com/danbulant/discord.js
synced 2026-06-24 01:01:53 +00:00
fix(ApiMessage): pass allowed_mentions when replying without content
This commit is contained in:
parent
e43ad1eea9
commit
88625a5b7d
1 changed files with 7 additions and 1 deletions
|
|
@ -170,6 +170,11 @@ class APIMessage {
|
|||
? this.target.client.options.allowedMentions
|
||||
: this.options.allowedMentions;
|
||||
|
||||
if (allowedMentions) {
|
||||
allowedMentions.replied_user = allowedMentions.repliedUser;
|
||||
delete allowedMentions.repliedUser;
|
||||
}
|
||||
|
||||
let message_reference;
|
||||
if (typeof this.options.replyTo !== 'undefined') {
|
||||
const message_id = this.isMessage
|
||||
|
|
@ -188,7 +193,8 @@ class APIMessage {
|
|||
embeds,
|
||||
username,
|
||||
avatar_url: avatarURL,
|
||||
allowed_mentions: typeof content === 'undefined' ? undefined : allowedMentions,
|
||||
allowed_mentions:
|
||||
typeof content === 'undefined' && typeof message_reference === 'undefined' ? undefined : allowedMentions,
|
||||
flags,
|
||||
message_reference,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue