Slash command for users to post confessions. You must create a slash command in the builder and add one option type string: https://autocode.com/tools/discord/command-builder/
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
let message = context.params.event.data.options[0].value;
await lib.discord.channels['@0.2.0'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: ` `,
embeds: [
{
type: 'rich',
title: `Confession `,
description: `Someone would like to confess:\n${message}`,
color: 0x525c5c,
thumbnail: {
url: `https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ6O5wJC4Fx9TAUvE4dIH6bh38Qqe-jwMx8Aw&usqp=CAU`,
height: 0,
width: 0,
},
},
],
});