mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 13:03:31 +01:00
join arrays with new lines when sending as messages
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -49,7 +49,7 @@ class RESTMethods {
|
|||||||
sendMessage(channel, content, tts, nonce, file) {
|
sendMessage(channel, content, tts, nonce, file) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const $this = this;
|
const $this = this;
|
||||||
|
content = this.rest.client.resolver.resolveString(content);
|
||||||
function req() {
|
function req() {
|
||||||
$this.rest.makeRequest('post', Constants.Endpoints.channelMessages(channel.id), true, {
|
$this.rest.makeRequest('post', Constants.Endpoints.channelMessages(channel.id), true, {
|
||||||
content, tts, nonce,
|
content, tts, nonce,
|
||||||
|
|||||||
@@ -279,6 +279,7 @@ class Message {
|
|||||||
* .catch(console.log);
|
* .catch(console.log);
|
||||||
*/
|
*/
|
||||||
reply(content, options = {}) {
|
reply(content, options = {}) {
|
||||||
|
content = this.client.resolver.resolveString(content);
|
||||||
const newContent = this.guild ? `${this.author}, ${content}` : content;
|
const newContent = this.guild ? `${this.author}, ${content}` : content;
|
||||||
return this.client.rest.methods.sendMessage(this.channel, newContent, options.tts);
|
return this.client.rest.methods.sendMessage(this.channel, newContent, options.tts);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user