From 205c5bf003abf5daec9543b7f1d8df8c86da1f3c Mon Sep 17 00:00:00 2001 From: void Date: Sat, 15 Feb 2020 01:32:07 +0100 Subject: [PATCH] fixed commandprefix, added discord support server invite to help command --- src/bots/discord/DiscordBot.js | 3 ++- src/bots/discord/DiscordMsgBuilder.js | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bots/discord/DiscordBot.js b/src/bots/discord/DiscordBot.js index 70c4bc6..93948f1 100644 --- a/src/bots/discord/DiscordBot.js +++ b/src/bots/discord/DiscordBot.js @@ -12,6 +12,7 @@ module.exports = class DiscordBot extends Discord.Client { this.config = null; this.commands = {}; this.token = token; + this.invite = 'https://discord.gg/zx2BWp2'; } send (msg, text) { @@ -103,7 +104,7 @@ module.exports = class DiscordBot extends Discord.Client { return new Promise((resolve, reject) => { try { this.config = this.db.webConfig['bot']; - this.config = this.config.commandprefix || "-"; + this.config.commandprefix = this.config.commandprefix || "-"; this.registerEvents(); this.registerCommands(['ombi', 'sonarr', 'radarr', 'tautulli']); diff --git a/src/bots/discord/DiscordMsgBuilder.js b/src/bots/discord/DiscordMsgBuilder.js index c151f2d..1f0ad63 100644 --- a/src/bots/discord/DiscordMsgBuilder.js +++ b/src/bots/discord/DiscordMsgBuilder.js @@ -6,6 +6,8 @@ const buildHelpAllMsg = function(client, commands) { let helpMsg = `To run a command in Mellow, use \`\`${client.config.commandprefix}command\`\`.\n` + `To run a command in this DM, use \`\`command\`\` with no prefix.\n\n` + 'Use ``help `` to view detailed information about a specific command.\n\n' + + `__**Discord Support Server**__\n` + + `${client.invite}\n\n` + `__**Available commands in Mellow**__\n\n` + '__Commands__\n';