Skip to content

Commit

Permalink
feat: keeping up with changes in #5298
Browse files Browse the repository at this point in the history
  • Loading branch information
iShibi committed May 10, 2021
1 parent b3854df commit f96663f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/structures/Message.js
Expand Up @@ -619,6 +619,8 @@ class Message extends Base {
* @property {string|boolean} [code] Language for optional codeblock formatting to apply
* @property {boolean|SplitOptions} [split=false] Whether or not the message should be split into multiple messages if
* it exceeds the character limit. If an object is provided, these are the options for splitting the message
* @property {boolean} [failIfNotExists=true] Whether to error if the referenced message
* does not exist (creates a standard message in this case when false)
*/

/**
Expand All @@ -634,7 +636,7 @@ class Message extends Base {
: APIMessage.transformOptions(content, options, {
reply: {
messageReference: this,
failIfNotExists: options?.reply?.failIfNotExists ?? content?.reply?.failIfNotExists ?? true,
failIfNotExists: options?.failIfNotExists ?? content?.failIfNotExists ?? true,
},
}),
);
Expand Down
4 changes: 3 additions & 1 deletion typings/index.d.ts
Expand Up @@ -3481,7 +3481,9 @@ declare module 'discord.js' {
failIfNotExists?: boolean;
}

interface ReplyMessageOptions extends Omit<MessageOptions, 'replyTo'> {}
interface ReplyMessageOptions extends Omit<MessageOptions, 'reply'> {
failIfNotExists?: boolean;
}

interface ResolvedOverwriteOptions {
allow: Permissions;
Expand Down

0 comments on commit f96663f

Please sign in to comment.