mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 03:23:29 +01:00
Make Message.edit() accept arrays. (#630)
* Make Message.edit() accept arrays. Update corresponding parameters in docs (#624). * Tweak parameter types in docs. * Update docs.
This commit is contained in:
committed by
Schuyler Cebulskie
parent
17bee8084e
commit
f3286402fb
File diff suppressed because one or more lines are too long
@@ -104,6 +104,8 @@ class RESTMethods {
|
|||||||
|
|
||||||
updateMessage(message, content) {
|
updateMessage(message, content) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
content = this.rest.client.resolver.resolveString(content);
|
||||||
|
|
||||||
this.rest.makeRequest('patch', Constants.Endpoints.channelMessage(message.channel.id, message.id), true, {
|
this.rest.makeRequest('patch', Constants.Endpoints.channelMessage(message.channel.id, message.id), true, {
|
||||||
content,
|
content,
|
||||||
}).then(data => {
|
}).then(data => {
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ class Message {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Edit the content of a message
|
* Edit the content of a message
|
||||||
* @param {string} content The new content for the message
|
* @param {StringResolvable} content The new content for the message
|
||||||
* @returns {Promise<Message>}
|
* @returns {Promise<Message>}
|
||||||
* @example
|
* @example
|
||||||
* // update the content of a message
|
* // update the content of a message
|
||||||
@@ -281,7 +281,7 @@ class Message {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Reply to a message
|
* Reply to a message
|
||||||
* @param {string} content The content for the message
|
* @param {StringResolvable} content The content for the message
|
||||||
* @param {MessageOptions} [options = {}] The options to provide
|
* @param {MessageOptions} [options = {}] The options to provide
|
||||||
* @returns {Promise<Message>}
|
* @returns {Promise<Message>}
|
||||||
* @example
|
* @example
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class TextBasedChannel {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Send a message to this channel
|
* Send a message to this channel
|
||||||
* @param {string} content The content to send
|
* @param {StringResolvable} content The content to send
|
||||||
* @param {MessageOptions} [options={}] The options to provide
|
* @param {MessageOptions} [options={}] The options to provide
|
||||||
* @returns {Promise<Message>}
|
* @returns {Promise<Message>}
|
||||||
* @example
|
* @example
|
||||||
@@ -57,7 +57,7 @@ class TextBasedChannel {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Send a text-to-speech message to this channel
|
* Send a text-to-speech message to this channel
|
||||||
* @param {string} content The content to send
|
* @param {StringResolvable} content The content to send
|
||||||
* @param {MessageOptions} [options={}] The options to provide
|
* @param {MessageOptions} [options={}] The options to provide
|
||||||
* @returns {Promise<Message>}
|
* @returns {Promise<Message>}
|
||||||
* @example
|
* @example
|
||||||
|
|||||||
Reference in New Issue
Block a user