role and everyone ping prevents

master
Kit Kasune 4 years ago
parent 22532982c3
commit e6793e5df2
  1. 3
      commands/social/afk.js
  2. 3
      commands/social/dnd.js

@ -27,7 +27,8 @@ module.exports = {
} else {tu.statusclearmode = 'auto';} } else {tu.statusclearmode = 'auto';}
if (!args.length) {return message.channel.send(`Syntax: \`${prefix}afk [clearMode] <reason>\``);} if (!args.length) {return message.channel.send(`Syntax: \`${prefix}afk [clearMode] <reason>\``);}
let reason = args.join(" "); 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.statustype = 'afk';
tu.statusmsg = reason.trim(); tu.statusmsg = reason.trim();
tu.statussetat = new Date(); tu.statussetat = new Date();

@ -27,7 +27,8 @@ module.exports = {
} else {tu.statusclearmode = 'manual';} } else {tu.statusclearmode = 'manual';}
if (!args.length) {return message.channel.send(`Syntax: \`${prefix}afk [clearMode] <reason>\``);} if (!args.length) {return message.channel.send(`Syntax: \`${prefix}afk [clearMode] <reason>\``);}
let reason = args.join(" "); 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.statustype = 'dnd';
tu.statusmsg = reason.trim(); tu.statusmsg = reason.trim();
tu.statussetat = new Date(); tu.statussetat = new Date();

Loading…
Cancel
Save