diff --git a/commands/yes.js b/commands/yes.js deleted file mode 100644 index ad18304..0000000 --- a/commands/yes.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - name: 'haha yes', - description: 'haha yes', - execute(message) { - message.channel.send('haha yes'); - }, -}; diff --git a/hahayesv2.js b/hahayesv2.js index 5dea136..cee613d 100644 --- a/hahayesv2.js +++ b/hahayesv2.js @@ -1,6 +1,7 @@ const fs = require('fs'); const Discord = require('discord.js'); const { prefix, token } = require('./config.json'); +const responseObject = require("./reply.json"); const client = new Discord.Client(); client.commands = new Discord.Collection(); @@ -20,6 +21,11 @@ client.on('ready', () => { }); client.on('message', message => { + // haha yes + if(responseObject[message.content]) { + message.channel.send(responseObject[message.content]); + } + if (!message.content.startsWith(prefix) || message.author.bot) return; const args = message.content.slice(prefix.length).split(/ +/); diff --git a/reply.json b/reply.json new file mode 100644 index 0000000..cd9d929 --- /dev/null +++ b/reply.json @@ -0,0 +1,4 @@ +{ + "haha yes": "haha yes", + "lol": "veri funi" +} \ No newline at end of file