mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
@@ -34,6 +34,7 @@ class TextBasedChannel {
|
||||
* {
|
||||
* tts: false,
|
||||
* nonce: '',
|
||||
* disable_everyone: false,
|
||||
* };
|
||||
* ```
|
||||
* @typedef {Object} MessageOptions
|
||||
@@ -51,7 +52,7 @@ class TextBasedChannel {
|
||||
* .catch(console.log);
|
||||
*/
|
||||
sendMessage(content, options = {}) {
|
||||
return this.client.rest.methods.sendMessage(this, content, options.tts, options.nonce);
|
||||
return this.client.rest.methods.sendMessage(this, content, options.tts, options.nonce, options.disable_everyone);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -66,7 +67,7 @@ class TextBasedChannel {
|
||||
* .catch(console.log);
|
||||
*/
|
||||
sendTTSMessage(content, options = {}) {
|
||||
return this.client.rest.methods.sendMessage(this, content, true, options.nonce);
|
||||
return this.client.rest.methods.sendMessage(this, content, true, options.nonce, options.disable_everyone);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -87,7 +88,7 @@ class TextBasedChannel {
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
this.client.resolver.resolveFile(attachment).then(file => {
|
||||
this.client.rest.methods.sendMessage(this, undefined, false, undefined, {
|
||||
this.client.rest.methods.sendMessage(this, undefined, false, undefined, false, {
|
||||
file,
|
||||
name: fileName,
|
||||
}).then(resolve).catch(reject);
|
||||
|
||||
Reference in New Issue
Block a user