Allow sendMessage disableEveryone to override client option (#605)

This commit is contained in:
Schuyler Cebulskie
2016-09-04 16:05:38 -04:00
committed by Amish Shah
parent 3b7d5e869b
commit 5bd258a557

View File

@@ -46,12 +46,12 @@ class RESTMethods {
});
}
sendMessage(channel, content, tts, nonce, disable_everyone, file) {
sendMessage(channel, content, tts, nonce, disableEveryone, 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) {
if (disableEveryone || (typeof disableEveryone === 'undefined' && this.rest.client.options.disable_everyone)) {
content = content.replace('@everyone', '@\u200beveryone').replace('@here', '@\u200bhere');
}