Added prefix message when pinged

master
Kit Kasune 4 years ago
parent 8a8b7c6bab
commit 65def95ee0
  1. 9
      events/message.js

@ -6,7 +6,7 @@ const UserData = require('../models/user');
module.exports = async (client, message) => {
if (message.author.bot) {return undefined;}
if (message.channel.type == 'dm') /*{var dmch = true;} else {var dmch = false};*/ {return undefined;}
if (message.channel.type === 'dm') /*{var dmch = true;} else {var dmch = false};*/ {return undefined;}
if (message.channel.type !== 'text' && message.channel.type !== 'dm') {return undefined;}
//if (message.channel.type == "text") {if (settings[message.guild.id]) {prefix = settings[message.guild.id].prefix;};};
@ -24,6 +24,13 @@ module.exports = async (client, message) => {
: message.content.slice(3 + client.user.id.length).trim().split(/\s+/g);
var cmd = args.shift().toLowerCase().trim();
if ([`<@${client.user.id}>`, `<@!${client.user.id}>`].includes(msg)) {
return message.channel.send(new Discord.MessageEmbed()
.setTitle(["Yep, that's me!", "^^ Hiya!", "Oh, hi there!", "Sure, what's up?", "How can I help!", "Natsuki is busy, but I can take a message for you!", "Teehee that's me!", "You were looking for Natsuki Tivastl, right?", "Sure! What's up?", "Pong!"][Math.floor(Math.random() * 10)])
.setDescription("My prefix here is `" + prefix + "`. Use `" + prefix + "help` to see what commands you can use.")
.setColor('c375f0'));
}
if (mention && message.guild) {require('../util/mention')(message, msg, args, cmd, prefix, mention, client);}
let tu = await UserData.findOne({uid: message.author.id});
if (tu && tu.statusmsg.length && tu.statusclearmode === 'auto') {

Loading…
Cancel
Save