This snippet sends a message to a channel of your choice when a user is unbanned
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
const event = context.params.event;
await lib.discord.channels['@0.3.0'].messages.create({
channel_id: `${process.env.LOG_CHANNEL_ID}`, //This is where the channel ID of your log channel comes in
content: '',
tts: false,
embeds: [
{
type: 'rich',
title: `User unbanned`,
description: `A user has just been unbanned!`,
color: 0x00ff0d, //You can change the color of the embed here
footer: {
text: `You can find more information in the Audit Logs!`,
},
timestamp: `${new Date().toISOString()}`,
},
],
});