When someone types !help the bot sends a message in the server and a direct message to the user. It can also be used as a template.
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
if (context.params.event.content.toLowerCase().startsWith(`!help`)) {
await lib.discord.channels['@0.0.6'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: `Hey! <@${context.params.event.author.id}> check your Direct Messages, I sent you the info.`,
});
await lib.discord.users['@0.1.4'].dms.create({
recipient_id: `${context.params.event.author.id}`,
content: ` `,
embed: {
title: 'help' /** you can change the embed title here **/,
description: 'bla bla bla bla' /**add some help info here**/,
color: 0x00ffc3 /** you can change the embed color here **/,
},
});
}