Enable !invite to give you the invite link for your bot
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
let message = context.params.event.content;
if (message.startsWith('!invite')) {
await lib.discord.channels['@0.1.0'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: '',
tts: false,
embed: {
type: 'rich',
title: 'Invite',
description: '',
color: 0x386691,
fields: [
{
name: '', //paste in your bot's invite link between the ""
value:
'Just copy into your browser to invite the bot to your server!',
},
],
},
});
}