mirror of
https://github.com/danbulant/discord.js
synced 2026-06-07 08:41:29 +00:00
fix(ApiMessage): respect allowedMentions with split (#4588)
This commit is contained in:
parent
2be68e4125
commit
a663ea4d2c
1 changed files with 3 additions and 3 deletions
|
|
@ -191,7 +191,7 @@ class APIMessage {
|
||||||
embeds,
|
embeds,
|
||||||
username,
|
username,
|
||||||
avatar_url: avatarURL,
|
avatar_url: avatarURL,
|
||||||
allowed_mentions: typeof content === 'string' ? allowedMentions : undefined,
|
allowed_mentions: typeof content === 'undefined' ? undefined : allowedMentions,
|
||||||
flags,
|
flags,
|
||||||
};
|
};
|
||||||
return this;
|
return this;
|
||||||
|
|
@ -246,8 +246,8 @@ class APIMessage {
|
||||||
data = { ...this.data, content: this.data.content[i] };
|
data = { ...this.data, content: this.data.content[i] };
|
||||||
opt = { ...this.options, content: this.data.content[i] };
|
opt = { ...this.options, content: this.data.content[i] };
|
||||||
} else {
|
} else {
|
||||||
data = { content: this.data.content[i], tts: this.data.tts };
|
data = { content: this.data.content[i], tts: this.data.tts, allowed_mentions: this.options.allowedMentions };
|
||||||
opt = { content: this.data.content[i], tts: this.data.tts };
|
opt = { content: this.data.content[i], tts: this.data.tts, allowedMentions: this.options.allowedMentions };
|
||||||
}
|
}
|
||||||
|
|
||||||
const apiMessage = new APIMessage(this.target, opt);
|
const apiMessage = new APIMessage(this.target, opt);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue