Allows users to talk in a channel anonymously without the use of prefix commands or slash commands. This can easily be used as a venting channel. To use just get the id of the channel you want to be anonymous and put it into the endpoint trigger!
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
let messageid = context.params.event.id;
let messagecontent = context.params.event.content;
await lib.discord.channels['@0.3.2'].messages.destroy({
message_id: `${messageid}`,
channel_id: `${context.params.event.channel_id}`,
});
await lib.discord.channels['@0.2.0'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: '',
tts: false,
embeds: [
{
type: 'rich',
title: ``,
description: `${messagecontent}`,
color: 0x885b65,
},
],
});