Haha-Yes/events/message.js

16 lines
459 B
JavaScript
Raw Normal View History

2018-09-18 20:32:33 +02:00
const responseObject = require("../reply.json");
const { Permissions } = require('discord.js');
const flags = [
'SEND_MESSAGES'
];
const permissions = new Permissions(flags);
module.exports = (client, message) => {
// Auto respond to messages
let message_content = message.content.toLowerCase();
if(responseObject[message_content]) {
message.channel.send(responseObject[message_content]);
};
}