From 55e9c9188fcced6b74045290b5767c68af572fda Mon Sep 17 00:00:00 2001 From: Sin-MacBook Date: Tue, 11 Aug 2020 23:13:24 +0200 Subject: ok --- src/modules/help.js | 13 +++++++++++++ src/modules/version.js | 9 +++++---- 2 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 src/modules/help.js (limited to 'src/modules') diff --git a/src/modules/help.js b/src/modules/help.js new file mode 100644 index 0000000..076b371 --- /dev/null +++ b/src/modules/help.js @@ -0,0 +1,13 @@ +const utils = require("../utils"); +const config = require('../config'); + +module.exports = ({ bot, knex, config, commands }) => { + commands.addInboxServerCommand('help', [], async (msg, args, thread) => { + let embed = { + title: "ModMail - Help", + type: "rich", + description: "[mm.bot/commands](https://gist.github.com/8cy/1ecb7106d096f77394122cfa4fae77ad)" + }; + utils.postSystemMessageWithFallback(msg.channel, thread, { embed }); + }); +}; diff --git a/src/modules/version.js b/src/modules/version.js index 033fbf0..fc15d9b 100644 --- a/src/modules/version.js +++ b/src/modules/version.js @@ -17,13 +17,14 @@ module.exports = ({ bot, knex, config, commands }) => { let response = `Modmail v${packageVersion}`; - let isGit; + /* let isGit; try { await access(GIT_DIR); isGit = true; } catch (e) { isGit = false; - } + } */ + let isGit = false; if (isGit) { let commitHash; @@ -41,12 +42,12 @@ module.exports = ({ bot, knex, config, commands }) => { response += ` (${commitHash.slice(0, 7)})`; } - if (config.updateNotifications) { + /* if (config.updateNotifications) { const availableUpdate = await updates.getAvailableUpdate(); if (availableUpdate) { response += ` (version ${availableUpdate} available)`; } - } + } */ utils.postSystemMessageWithFallback(msg.channel, thread, response); }); -- cgit v1.2.3