Responds with a nice embedded message when someone mentions your bot.
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
await lib.discord.channels['@0.1.1'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: [
`Thanks for mentioning me <@!${context.params.event.author.id}>!`,
`By the way, you can customize this message however you want!`
].join('\n'),
embed: {
"type": "rich",
"title": "This is a title field!",
"description": "For help with embeds, try: https://autocode.com/tools/discord/embed-builder/",
"color": 0x00AA00,
"fields": [
{
"name": "This is a field",
"value": "This is a field value"
},
{
"name": "You can even make fields inline!",
"value": "It's pretty cool!",
"inline": true
},
{
"name": "On the same row as the one before!",
"value": "Just set inline: true",
"inline": true
}
],
"url": "https://autocode.com/"
}
});