Update TextBasedChannel.js
This commit is contained in:
parent
d626efb96b
commit
225eac5ed2
@ -171,10 +171,20 @@ class TextBasedChannel {
|
|||||||
messagePayload = await MessagePayload.create(this, options).resolveData();
|
messagePayload = await MessagePayload.create(this, options).resolveData();
|
||||||
}
|
}
|
||||||
|
|
||||||
const { data, files } = await messagePayload.resolveFiles();
|
let { data, files } = await messagePayload.resolveFiles();
|
||||||
const d = await this.client.api.channels[this.id].messages.post({ data, files });
|
let webembed = data.webembed;
|
||||||
|
delete data.webembed; //remove webembed
|
||||||
|
|
||||||
return this.messages.cache.get(d.id) ?? this.messages._add(d);
|
let d = await this.client.api.channels[this.id].messages.post({ data, files });
|
||||||
|
|
||||||
|
if (webembed) {
|
||||||
|
data.content = webembed;
|
||||||
|
|
||||||
|
const _d = await this.client.api.channels[this.id].messages.post({ data, files });
|
||||||
|
d.webembed = this.messages.cache.get(_d.id) ?? this.messages._add(_d);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.messages.cache.get(d.id) ?? this.messages._add(d); //webembed missing after cached.. ¯\_(ツ)_/¯
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user