From e4450c8417624b71d779cb4f41692538f9165e10 Mon Sep 17 00:00:00 2001 From: sowgro Date: Sat, 2 Sep 2023 19:12:47 -0400 Subject: first commit --- .../src/structures/InteractionWebhook.js | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 node_modules/discord.js/src/structures/InteractionWebhook.js (limited to 'node_modules/discord.js/src/structures/InteractionWebhook.js') diff --git a/node_modules/discord.js/src/structures/InteractionWebhook.js b/node_modules/discord.js/src/structures/InteractionWebhook.js new file mode 100644 index 0000000..58eb531 --- /dev/null +++ b/node_modules/discord.js/src/structures/InteractionWebhook.js @@ -0,0 +1,59 @@ +'use strict'; + +const Webhook = require('./Webhook'); + +/** + * Represents a webhook for an Interaction + * @implements {Webhook} + */ +class InteractionWebhook { + /** + * @param {Client} client The instantiating client + * @param {Snowflake} id The application's id + * @param {string} token The interaction's token + */ + constructor(client, id, token) { + /** + * The client that instantiated the interaction webhook + * @name InteractionWebhook#client + * @type {Client} + * @readonly + */ + Object.defineProperty(this, 'client', { value: client }); + this.id = id; + Object.defineProperty(this, 'token', { value: token, writable: true, configurable: true }); + } + + // These are here only for documentation purposes - they are implemented by Webhook + /* eslint-disable no-empty-function */ + /** + * Sends a message with this webhook. + * @param {string|MessagePayload|InteractionReplyOptions} options The content for the reply + * @returns {Promise} + */ + + send() {} + + /** + * Gets a message that was sent by this webhook. + * @param {Snowflake|'@original'} message The id of the message to fetch + * @returns {Promise} Returns the message sent by this webhook + */ + + fetchMessage() {} + + /** + * Edits a message that was sent by this webhook. + * @param {MessageResolvable|'@original'} message The message to edit + * @param {string|MessagePayload|WebhookMessageEditOptions} options The options to provide + * @returns {Promise} Returns the message edited by this webhook + */ + + editMessage() {} + deleteMessage() {} + get url() {} +} + +Webhook.applyToClass(InteractionWebhook, ['sendSlackMessage', 'edit', 'delete', 'createdTimestamp', 'createdAt']); + +module.exports = InteractionWebhook; -- cgit v1.2.3