docs(WebhookClient): Document working options (#8375)

This commit is contained in:
Jiralite
2022-07-27 12:05:47 +01:00
committed by GitHub
parent 7fd9ed8f13
commit ba6797e742

View File

@@ -29,9 +29,16 @@ class WebhookClient extends BaseClient {
* @typedef {WebhookClientDataIdWithToken|WebhookClientDataURL} WebhookClientData * @typedef {WebhookClientDataIdWithToken|WebhookClientDataURL} WebhookClientData
*/ */
/**
* Options for a webhook client.
* @typedef {Object} WebhookClientOptions
* @property {MessageMentionOptions} [allowedMentions] Default value for {@link WebhookMessageOptions#allowedMentions}
* @property {RESTOptions} [rest] Options for the REST manager
*/
/** /**
* @param {WebhookClientData} data The data of the webhook * @param {WebhookClientData} data The data of the webhook
* @param {ClientOptions} [options] Options for the client * @param {WebhookClientOptions} [options] Options for the webhook client
*/ */
constructor(data, options) { constructor(data, options) {
super(options); super(options);
@@ -51,6 +58,12 @@ class WebhookClient extends BaseClient {
Object.defineProperty(this, 'token', { value: token, writable: true, configurable: true }); Object.defineProperty(this, 'token', { value: token, writable: true, configurable: true });
} }
/**
* The options the webhook client was instantiated with.
* @type {WebhookClientOptions}
* @name WebhookClient#options
*/
// These are here only for documentation purposes - they are implemented by Webhook // These are here only for documentation purposes - they are implemented by Webhook
/* eslint-disable no-empty-function, valid-jsdoc */ /* eslint-disable no-empty-function, valid-jsdoc */
/** /**