mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 01:23:31 +01:00
Add disableEveryone option (#400)
* Added support for new game objects bot.setStreaming(name, url, type, callback); added logic for Internal setStatus updated to check if string or object * Add disableEveryone option * forgot to compile oh well, it can be squash merged
This commit is contained in:
@@ -727,6 +727,10 @@ var InternalClient = (function () {
|
||||
return this.resolver.resolveChannel(where).then(function (destination) {
|
||||
var content = _this15.resolver.resolveString(_content);
|
||||
|
||||
if (_this15.client.options.disableEveryone || options.disableEveryone) {
|
||||
content = content.replace(/(@)(everyone|here)/g, "$1$2");
|
||||
}
|
||||
|
||||
if (options.file) {
|
||||
return _this15.resolver.resolveFile(options.file.file).then(function (file) {
|
||||
return _this15.apiRequest("post", _Constants.Endpoints.CHANNEL_MESSAGES(destination.id), true, {
|
||||
@@ -770,6 +774,9 @@ var InternalClient = (function () {
|
||||
content = {
|
||||
content: this.resolver.resolveString(content)
|
||||
};
|
||||
if (this.client.options.disableEveryone) {
|
||||
content.content = content.content.replace(/(@)(everyone|here)/g, "$1$2");
|
||||
}
|
||||
}
|
||||
|
||||
return this.resolver.resolveChannel(where).then(function (channel) {
|
||||
|
||||
Reference in New Issue
Block a user