mirror of
https://github.com/danbulant/discord.js
synced 2026-07-08 20:51:14 +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.target.client.options.allowedMentions
|
||||||
: this.options.allowedMentions;
|
: this.options.allowedMentions;
|
||||||
|
|
||||||
|
if (allowedMentions) {
|
||||||
|
allowedMentions.replied_user = allowedMentions.repliedUser;
|
||||||
|
delete allowedMentions.repliedUser;
|
||||||
|
}
|
||||||
|
|
||||||
let message_reference;
|
let message_reference;
|
||||||
if (typeof this.options.replyTo !== 'undefined') {
|
if (typeof this.options.replyTo !== 'undefined') {
|
||||||
const message_id = this.isMessage
|
const message_id = this.isMessage
|
||||||
|
|
@ -188,7 +193,8 @@ class APIMessage {
|
||||||
embeds,
|
embeds,
|
||||||
username,
|
username,
|
||||||
avatar_url: avatarURL,
|
avatar_url: avatarURL,
|
||||||
allowed_mentions: typeof content === 'undefined' ? undefined : allowedMentions,
|
allowed_mentions:
|
||||||
|
typeof content === 'undefined' && typeof message_reference === 'undefined' ? undefined : allowedMentions,
|
||||||
flags,
|
flags,
|
||||||
message_reference,
|
message_reference,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue