A slash command that sends a custom message as if it came from the bot directly. The original command is hidden so no one will know it was you! This requires a slash command with a single 'String' option.
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
const event = context.params.event
// Get the message the user entered
const content = event.data.options[0].value
// Send the message to channel as the bot
if (event.member.permission_names.includes('ADMINISTRATOR'))
await lib.discord.channels['@0.1.2'].messages.create({
channel_id: event.channel_id, content,
});