Sends your bot's invite link to the channel when triggered. Dont forgot to type in your name, and you can also edit the footer icon url! It's my first snippet, and I hope you like it :)
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
if (context.params.event.content.startsWith(';invite')) {
let botInfo = await lib.discord.users['@0.1.3'].me.list();
await lib.discord.channels['@0.1.1'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: '',
tts: false,
embed: {
type: 'rich',
title: 'Invite me!',
description: '**Find me cool? Just click above to invite me** :)',
color: 0xc7a69e,
footer: {
text: 'Developed by: YOUR NAME HERE',
icon_url:
'https://images-ext-1.discordapp.net/external/y0RrZQU3NSxjF9J7iB9ESdOAoH9FeY8BH6E80tQjJPw/https/images-ext-1.discordapp.net/external/82kWPO6axS083orahLjUSfI05MukE2l2uGM6AWuTn0o/%253Fsize%253D1024/https/cdn.discordapp.com/avatars/847647123435683860/a_6b5ccd0ae0e861cc0a02fa1be45e0c40.gif',
},
url: `https://discord.com/oauth2/authorize?client_id=${botInfo.id}&scope=identify%20bot%20applications.commands&permissions=2146958591`,
},
});
}