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

@@ -46,10 +46,15 @@ class RESTMethods {
});
}
sendMessage(channel, content, tts, nonce, file) {
sendMessage(channel, content, tts, nonce, disable_everyone, file) {
return new Promise((resolve, reject) => {
const $this = this;
content = this.rest.client.resolver.resolveString(content);
if (this.rest.client.options.disable_everyone || disable_everyone) {
content = content.replace('@everyone', '@\u200beveryone').replace('@here', '@\u200bhere');
}
function req() {
$this.rest.makeRequest('post', Constants.Endpoints.channelMessages(channel.id), true, {
content, tts, nonce,