Want to give a warm hello to people that are new to your channel? Easy with this Snippet. Install and it works.
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
let isFirstMessage = context.params.event.first_message;
let userName = context.params.event.author.display_name;
if (isFirstMessage) {
//Create a welcome message here
let welcomeMessage = await lib.twitch.chat['@1.0.0'].messages.create({
channel_id: `${context.params.event.channel.id}`,
content: `:D Somebody new is here! Give a warm welcome to ${userName} GivePLZ.`,
});
}