From 0ca661d2ab2a9b5122708cd81783c947fc109e28 Mon Sep 17 00:00:00 2001 From: CBenni Date: Tue, 12 Dec 2017 14:34:33 +0100 Subject: [PATCH] Added /help command --- index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.js b/index.js index 9115f41..997bd34 100644 --- a/index.js +++ b/index.js @@ -197,6 +197,11 @@ client.on('message', async function (message) { message.channel.send(`Invite link: <${invitelink}>`); return; } + if(message.cleanContent.startsWith('/help') || message.cleanContent.startsWith('/beebot')) { + let commands = Object.keys(templates).map(x => '/'+x).join(', '); + message.channel.send(`Available commands: ${commands}`); + return; + } const messageSplit = message.cleanContent.split(" "); const emoji = findEmoji(message.cleanContent);