master
Kit Kasune 3 years ago
parent c7b9e5d9d8
commit 91c37247d3
  1. 2
      commands/fun/rp.js
  2. 2
      events/messageCreate.js
  3. 3
      util/response/filterresponse.js

@ -71,7 +71,7 @@ module.exports = {
let n = message.member ? message.member.displayName : message.author.username;
return message.channel.send({embeds: [new Discord.MessageEmbed()
.setAuthor({name: `${n}${n.endsWith('s') ? "'" : "'s"} RP Characters`, iconURL: (message.member || message.author).displayAvatarURL({dynamic: true})})
.setDescription(Object.keys(rp.chars).map(ch => `\`${ch}\`: ${rp.chars[ch].name}`).join(','))
.setDescription(Object.keys(rp.chars).map(ch => `\`${ch}\`: ${rp.chars[ch].name}`).join(', '))
.setColor('c375f0')
.setFooter({text: "Natsuki"})
.setTimestamp()

@ -94,7 +94,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))) {
AR.findOne({gid: message.guild.id}).then(ar => {
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())])).catch(() => {});}
if (ar && ar.triggers.length && ar.triggers.includes(msg.trim())) {return require('../util/response/filterresponse')(message.member, client, ar.ars[ar.triggers.indexOf(msg.trim())]).then(t => message.channel.send(t).catch(() => {})).catch(() => {});}
});
}

@ -1,8 +1,9 @@
module.exports = async (member, client, text) => {
const go = await member.guild.fetchOwner();
text = text
.replace(/(?:{{member}}|{{m}})/gm, member.displayName)
.replace(/(?:{{membercount}}|{{mc}})/gm, `${member.guild.members.cache.size}`)
.replace(/(?:{{owner}}|{{o}})/gm, member.guild.fetchOwner().then(owner => owner.displayName))
.replace(/(?:{{owner}}|{{o}})/gm, go.displayName)
.replace(/(?:{{ping}}|{{mp}}|{{memberping}}|{{p}})/gm, `<@${member.id}>`)
.replace(/(?:{{s}}|{{server}}|{{servername}}|{{sn}})/gm, member.guild.name)
.replace(/{{n}}/gm, '\n')

Loading…
Cancel
Save