fix(Message): make #channel and #guild getters (#6271)

This commit is contained in:
Souji
2021-08-04 22:47:32 +02:00
committed by GitHub
parent 5b0621fb3a
commit 6e3236ab64
11 changed files with 41 additions and 25 deletions

View File

@@ -167,9 +167,8 @@ class MessagePayload {
let message_reference;
if (typeof this.options.reply === 'object') {
const message_id = this.isMessage
? this.target.channel.messages.resolveId(this.options.reply.messageReference)
: this.target.messages.resolveId(this.options.reply.messageReference);
const reference = this.options.reply.messageReference;
const message_id = this.isMessage ? reference.id ?? reference : this.target.messages.resolveId(reference);
if (message_id) {
message_reference = {
message_id,