aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/help.js13
-rw-r--r--src/modules/version.js9
2 files changed, 18 insertions, 4 deletions
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);
});