diff --git a/src/main.js b/src/main.js index 6b6cf51..67cde89 100644 --- a/src/main.js +++ b/src/main.js @@ -19,6 +19,7 @@ const greeting = require('./modules/greeting'); const typingProxy = require('./modules/typingProxy'); const version = require('./modules/version'); const newthread = require('./modules/newthread'); +const idModule = require('./modules/id'); const attachments = require("./data/attachments"); const {ACCIDENTAL_THREAD_MESSAGES} = require('./data/constants'); @@ -172,6 +173,7 @@ module.exports = { await typingProxy(bot); await version(bot); await newthread(bot); + await idModule(bot); // Connect to Discord console.log('Connecting to Discord...'); diff --git a/src/modules/id.js b/src/modules/id.js new file mode 100644 index 0000000..7e8c6b1 --- /dev/null +++ b/src/modules/id.js @@ -0,0 +1,10 @@ +const threadUtils = require("../threadUtils"); + +module.exports = bot => { + const addInboxServerCommand = (...args) => threadUtils.addInboxServerCommand(bot, ...args); + + addInboxServerCommand('id', async (msg, args, thread) => { + if (! thread) return; + thread.postSystemMessage(thread.user_id); + }); +};