ar templating

master
Kit Kasune 3 years ago
parent dd3c1fbb2e
commit bc41ec7f15
  1. 2
      events/message.js

@ -47,7 +47,7 @@ module.exports = async (client, message) => {
if (message.guild && client.misc.cache.ar.has(message.guild.id) && client.misc.cache.ar.get(message.guild.id).includes(msg.trim()) && !(client.misc.cache.arIgnore.has(message.guild.id) && client.misc.cache.arIgnore.get(message.guild.id).includes(message.channel.id))) { if (message.guild && client.misc.cache.ar.has(message.guild.id) && client.misc.cache.ar.get(message.guild.id).includes(msg.trim()) && !(client.misc.cache.arIgnore.has(message.guild.id) && client.misc.cache.arIgnore.get(message.guild.id).includes(message.channel.id))) {
AR.findOne({gid: message.guild.id}).then(ar => { AR.findOne({gid: message.guild.id}).then(ar => {
if (ar && ar.triggers.length && ar.triggers.includes(msg.trim())) {return message.channel.send(ar.ars[ar.triggers.indexOf(msg.trim())]);} if (ar && ar.triggers.length && ar.triggers.includes(msg.trim())) {return message.channel.send(require('../util/response/filterresponse')(message.member, client, ar.ars[ar.triggers.indexOf(msg.trim())]));}
}); });
} }

Loading…
Cancel
Save