A prefix command that shows information about the user account
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
var message = context.params.event.content;
var mention = message.split(' ')[1];
var user = await lib.discord.users['@0.2.1'].retrieve({
user_id: `${mention}`
});
if (!mention || !mention.match(/<@.*>/)){
await lib.discord.channels['@0.3.2'].messages.create({
channel_id: context.params.event.channel_id,
content: "Please mention a user"
});
} else { await lib.discord.channels['@0.3.2'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: `${JSON.stringify(user, null, 2)}`
});
}