Added disable_everyone (#603)

* Added disable_everyone

* Fixed docs
This commit is contained in:
Hackzzila
2016-09-04 13:03:59 -05:00
committed by Amish Shah
parent 48e7fad1c9
commit 3b7d5e869b
4 changed files with 13 additions and 5 deletions

View File

@@ -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);