@@ -145,10 +145,12 @@ class MessagePayload {
|
|||||||
let username;
|
let username;
|
||||||
let avatarURL;
|
let avatarURL;
|
||||||
let threadName;
|
let threadName;
|
||||||
|
let appliedTags;
|
||||||
if (isWebhook) {
|
if (isWebhook) {
|
||||||
username = this.options.username ?? this.target.name;
|
username = this.options.username ?? this.target.name;
|
||||||
if (this.options.avatarURL) avatarURL = this.options.avatarURL;
|
if (this.options.avatarURL) avatarURL = this.options.avatarURL;
|
||||||
if (this.options.threadName) threadName = this.options.threadName;
|
if (this.options.threadName) threadName = this.options.threadName;
|
||||||
|
if (this.options.appliedTags) appliedTags = this.options.appliedTags;
|
||||||
}
|
}
|
||||||
|
|
||||||
let flags;
|
let flags;
|
||||||
@@ -231,6 +233,7 @@ class MessagePayload {
|
|||||||
attachments: this.options.attachments,
|
attachments: this.options.attachments,
|
||||||
sticker_ids: this.options.stickers?.map(sticker => sticker.id ?? sticker),
|
sticker_ids: this.options.stickers?.map(sticker => sticker.id ?? sticker),
|
||||||
thread_name: threadName,
|
thread_name: threadName,
|
||||||
|
applied_tags: appliedTags,
|
||||||
poll: this.options.poll instanceof MessagePoll ? this.options.poll.toJSON() : this.options.poll,
|
poll: this.options.poll instanceof MessagePoll ? this.options.poll.toJSON() : this.options.poll,
|
||||||
};
|
};
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -118,6 +118,8 @@ class Webhook {
|
|||||||
* <info>For interaction webhooks, this property is ignored</info>
|
* <info>For interaction webhooks, this property is ignored</info>
|
||||||
* @property {string} [threadName] Name of the thread to create (only available if webhook is in a forum channel)
|
* @property {string} [threadName] Name of the thread to create (only available if webhook is in a forum channel)
|
||||||
* @property {MessageFlags} [flags] Which flags to set for the message. Only `SUPPRESS_EMBEDS` can be set.
|
* @property {MessageFlags} [flags] Which flags to set for the message. Only `SUPPRESS_EMBEDS` can be set.
|
||||||
|
* @property {Snowflake[]} [appliedTags]
|
||||||
|
* The tags to apply to the created thread (only available if the webhook is in a forum channel)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
1
typings/index.d.ts
vendored
1
typings/index.d.ts
vendored
@@ -7589,6 +7589,7 @@ export interface WebhookMessageOptions extends Omit<MessageOptions, 'reply' | 's
|
|||||||
avatarURL?: string;
|
avatarURL?: string;
|
||||||
threadId?: Snowflake;
|
threadId?: Snowflake;
|
||||||
threadName?: string;
|
threadName?: string;
|
||||||
|
appliedTags?: Snowflake[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export type WebhookType = keyof typeof WebhookTypes;
|
export type WebhookType = keyof typeof WebhookTypes;
|
||||||
|
|||||||
Reference in New Issue
Block a user