From e6793e5df24c5bf40ada5fed42bd6271df99c55c Mon Sep 17 00:00:00 2001 From: WubzyGD Date: Tue, 18 May 2021 02:18:43 -0600 Subject: [PATCH] role and everyone ping prevents --- commands/social/afk.js | 3 ++- commands/social/dnd.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/commands/social/afk.js b/commands/social/afk.js index f687e00..b2a0e39 100644 --- a/commands/social/afk.js +++ b/commands/social/afk.js @@ -27,7 +27,8 @@ module.exports = { } else {tu.statusclearmode = 'auto';} if (!args.length) {return message.channel.send(`Syntax: \`${prefix}afk [clearMode] \``);} let reason = args.join(" "); - if (reason.length > 150) {return message.reply("That status a bit long; keep it under 150 characters.");} + if (reason.length > 150) {return message.channel.send("That status a bit long; keep it under 150 characters.");} + if (reason.match(/<@&\d+>|@everyone/gm)) {return message.channel.send("I won't ping any roles or @ everyone!");} tu.statustype = 'afk'; tu.statusmsg = reason.trim(); tu.statussetat = new Date(); diff --git a/commands/social/dnd.js b/commands/social/dnd.js index 775ca6a..f25973a 100644 --- a/commands/social/dnd.js +++ b/commands/social/dnd.js @@ -27,7 +27,8 @@ module.exports = { } else {tu.statusclearmode = 'manual';} if (!args.length) {return message.channel.send(`Syntax: \`${prefix}afk [clearMode] \``);} let reason = args.join(" "); - if (reason.length > 150) {return message.reply("That status a bit long; keep it under 150 characters.");} + if (reason.length > 150) {return message.channel.send("That status a bit long; keep it under 150 characters.");} + if (reason.match(/<@&\d+>|@everyone/gm)) {return message.channel.send("I won't ping any roles or @ everyone!");} tu.statustype = 'dnd'; tu.statusmsg = reason.trim(); tu.statussetat = new Date();