|
|
@ -2,6 +2,7 @@ const { Listener } = require('discord-akairo');
|
|
|
|
const responseObject = require("../json/reply.json");
|
|
|
|
const responseObject = require("../json/reply.json");
|
|
|
|
const reactObject = require("../json/react.json");
|
|
|
|
const reactObject = require("../json/react.json");
|
|
|
|
const imgResponseObject = require("../json/imgreply.json");
|
|
|
|
const imgResponseObject = require("../json/imgreply.json");
|
|
|
|
|
|
|
|
const SelfReloadJSON = require('self-reload-json');
|
|
|
|
|
|
|
|
|
|
|
|
class MessageListener extends Listener {
|
|
|
|
class MessageListener extends Listener {
|
|
|
|
constructor() {
|
|
|
|
constructor() {
|
|
|
@ -12,8 +13,7 @@ class MessageListener extends Listener {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
async exec(message) {
|
|
|
|
async exec(message) {
|
|
|
|
const autoresponse = require("../json/autoresponse.json");
|
|
|
|
let autoresponse = new SelfReloadJSON('./json/autoresponse.json');
|
|
|
|
|
|
|
|
|
|
|
|
let message_content = message.content.toLowerCase();
|
|
|
|
let message_content = message.content.toLowerCase();
|
|
|
|
|
|
|
|
|
|
|
|
if (message.author.bot) return; {
|
|
|
|
if (message.author.bot) return; {
|
|
|
@ -39,7 +39,7 @@ class MessageListener extends Listener {
|
|
|
|
message.react("496028845967802378")
|
|
|
|
message.react("496028845967802378")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const customresponse = require(`../tag/${message.guild.id}.json`);
|
|
|
|
let customresponse = new SelfReloadJSON(`./tag/${message.guild.id}.json`);
|
|
|
|
// User autoresponse
|
|
|
|
// User autoresponse
|
|
|
|
if(customresponse[message_content]) {
|
|
|
|
if(customresponse[message_content]) {
|
|
|
|
message.channel.send(customresponse[message_content])
|
|
|
|
message.channel.send(customresponse[message_content])
|
|
|
|