Skip to content

Commit a663ea4

Browse files
authored
fix(ApiMessage): respect allowedMentions with split (#4588)
1 parent 2be68e4 commit a663ea4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/structures/APIMessage.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ class APIMessage {
191191
embeds,
192192
username,
193193
avatar_url: avatarURL,
194-
allowed_mentions: typeof content === 'string' ? allowedMentions : undefined,
194+
allowed_mentions: typeof content === 'undefined' ? undefined : allowedMentions,
195195
flags,
196196
};
197197
return this;
@@ -246,8 +246,8 @@ class APIMessage {
246246
data = { ...this.data, content: this.data.content[i] };
247247
opt = { ...this.options, content: this.data.content[i] };
248248
} else {
249-
data = { content: this.data.content[i], tts: this.data.tts };
250-
opt = { content: this.data.content[i], tts: this.data.tts };
249+
data = { content: this.data.content[i], tts: this.data.tts, allowed_mentions: this.options.allowedMentions };
250+
opt = { content: this.data.content[i], tts: this.data.tts, allowedMentions: this.options.allowedMentions };
251251
}
252252

253253
const apiMessage = new APIMessage(this.target, opt);

0 commit comments

Comments
 (0)