The bot will forward any messages it is mentioned in.
// authenticates you with the API standard library
// type `await lib.` to display API autocomplete
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
// The message.
let message = context.params.event.content;
let sender = context.params.event.author.username;
message = message.replace(`${process.env.BOT_ID}`, ''); //removes the bot ping from the message, optional but makes the message easier to read...
console.log(`Message = ${message}`);
console.log(`Sent by ${sender}`);
await lib.discord.users['@0.1.5'].dms.create({
recipient_id: `${process.env.USER_ID}`, //this is where the bot sends the messages to
content: `Bot was pinged by ${sender}, the message said: ${message}`,
});