diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.js | 4 | ||||
| -rw-r--r-- | src/modules/help.js | 13 | ||||
| -rw-r--r-- | src/modules/version.js | 9 |
3 files changed, 21 insertions, 5 deletions
diff --git a/src/main.js b/src/main.js index b8ef515..24d6b22 100644 --- a/src/main.js +++ b/src/main.js @@ -27,6 +27,7 @@ const version = require('./modules/version'); const newthread = require('./modules/newthread'); const idModule = require('./modules/id'); const alert = require('./modules/alert'); +const help = require('./modules/help'); const {ACCIDENTAL_THREAD_MESSAGES} = require('./data/constants'); @@ -258,7 +259,8 @@ function initPlugins() { version, newthread, idModule, - alert + alert, + help ]; const plugins = [...builtInPlugins]; 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); }); |