Describe the bug
When trying to send an embed, I get an error:
Error: [GuildedAPIError:400:POST] /channels/84e7a9e2-b595-493e-9a39-18ed347b92a8/messages - data must have required property 'content', data must have required property 'embeds', data must match a schema
To Reproduce
Steps to reproduce the behavior:
var obj = {
embeds: [{title: 'Test'}]
};
message.reply(obj);
Expected behavior
Should send the embed as expected
Screenshots
I believe the issue originates from the compiled version of Message.js
/** Send a message that replies to this message. It mentions the user who sent this message. */
reply(content) {
var _a;
if (typeof content === "string")
content = { content };
return this.client.messages.send(this.channelId, { content: content.content, replyMessageIds: (_a = content.replyMessageIds) !== null && _a !== void 0 ? _a : [this.id] });
}
This compiled version does not spread the properties as denoted in the .ts file:
/** Send a message that replies to this message. It mentions the user who sent this message. */
reply(content: RESTPostChannelMessagesBody | string) {
return this.client.messages.send(
this.channelId,
typeof content !== "string"
? {
...content,
replyMessageIds: content.replyMessageIds ? [this.id, ...content.replyMessageIds] : [this.id],
}
: content,
);
}
Please complete the following information
NodeJS version: 18.0.0
NPM version 6.x
Package version: 0.7.1
Additional context
Add any other context about the problem here.
Describe the bug When trying to send an embed, I get an error:
To Reproduce Steps to reproduce the behavior:
Expected behavior Should send the embed as expected
Screenshots I believe the issue originates from the compiled version of
Message.js
This compiled version does not spread the properties as denoted in the .ts file:
Please complete the following information
Additional context Add any other context about the problem here.