mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
docs(*): add links to Discord's API objects & data (#5862)
This commit is contained in:
@@ -31,13 +31,20 @@ class APIMessage {
|
||||
|
||||
/**
|
||||
* Data sendable to the API
|
||||
* @type {?Object}
|
||||
* @type {?APIMessageRaw}
|
||||
*/
|
||||
this.data = null;
|
||||
|
||||
/**
|
||||
* @typedef {Object} MessageFile
|
||||
* @property {Buffer|string|Stream} attachment The original attachment that generated this file
|
||||
* @property {string} name The name of this file
|
||||
* @property {Buffer|Stream} file The file to be sent to the API
|
||||
*/
|
||||
|
||||
/**
|
||||
* Files sendable to the API
|
||||
* @type {?Object[]}
|
||||
* @type {?MessageFile[]}
|
||||
*/
|
||||
this.files = null;
|
||||
}
|
||||
@@ -259,7 +266,7 @@ class APIMessage {
|
||||
/**
|
||||
* Resolves a single file into an object sendable to the API.
|
||||
* @param {BufferResolvable|Stream|FileOptions|MessageAttachment} fileLike Something that could be resolved to a file
|
||||
* @returns {Object}
|
||||
* @returns {MessageFile}
|
||||
*/
|
||||
static async resolveFile(fileLike) {
|
||||
let attachment;
|
||||
@@ -313,3 +320,8 @@ module.exports = APIMessage;
|
||||
* @typedef {TextChannel|DMChannel|User|GuildMember|Webhook|WebhookClient|Interaction|InteractionWebhook|
|
||||
* Message|MessageManager} MessageTarget
|
||||
*/
|
||||
|
||||
/**
|
||||
* @external APIMessageRaw
|
||||
* @see {@link https://discord.com/developers/docs/resources/channel#message-object}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user