Sends a message to log channel when a channel was deleted in embed
// authenticates you with the API standard library
// type `await lib.` to display API autocomplete
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
const event = context.params.event;
await lib.discord.channels['@0.2.0'].messages.create({
channel_id: `${process.env.LOG_CHANNEL_ID}`,
content: ``,
tts: false,
embed: {
type: 'rich',
title: 'Channel Delete',
description: `User deleted **CHANNEL**!`,
color: 0x00baff,
footer: {
text: 'Need more information? Check audit log!',
},
},
});
// Credits to Ronan Films