Add !id
The !id command returns the user ID of the current thread. Useful for getting the user ID on mobile.master
parent
e5b29a235e
commit
319f6571bc
|
@ -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...');
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
};
|
Loading…
Reference in New Issue