Prefix command that sends your Twitch bot's invite link back to a channel's chat when someone types "!invite"
// authenticates you with the API standard library
// type `await lib.` to display API autocomplete
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
let authedUserData = await lib.twitch.users['@1.0.1'].me.retrieve();
await lib.twitch.chat['@1.0.0'].messages.create({
channel_name: context.params.event.channel.name,
content: [
`Hey there! You can invite me to your server by using this link:`,
`https://bot.gg/twitch/invite/${authedUserData.app.client_id}/`
].join(' ')
});