mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +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:
@@ -616,6 +616,10 @@ export default class InternalClient {
|
||||
.then(destination => {
|
||||
var content = this.resolver.resolveString(_content);
|
||||
|
||||
if (this.client.options.disableEveryone || options.disableEveryone) {
|
||||
content = content.replace(/(@)(everyone|here)/g, '$1\u200b$2');
|
||||
}
|
||||
|
||||
if (options.file) {
|
||||
return this.resolver.resolveFile(options.file.file)
|
||||
.then(file =>
|
||||
@@ -655,6 +659,9 @@ export default class InternalClient {
|
||||
content = {
|
||||
content: this.resolver.resolveString(content)
|
||||
};
|
||||
if (this.client.options.disableEveryone) {
|
||||
content.content = content.content.replace(/(@)(everyone|here)/g, '$1\u200b$2');
|
||||
}
|
||||
}
|
||||
|
||||
return this.resolver.resolveChannel(where)
|
||||
|
||||
Reference in New Issue
Block a user