This snippet will help your bot send a message whenever it is mentioned. See comment below to find which messages the bot will send. Update them as you wish!
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
const username = context.params.event.author.username;
//Update your messages below!
const responses = [
`Hey, @${username}!`,
`Yes, why do you need me?`,
`I don't understand!`,
`Please stop calling me!`,
`Stop the ping!`,
`AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA!`,
];
let counter = await lib.keyvalue.store['@0.1.16'].get({
key: `bot_mention_counter_${context.params.event.broadcaster_id}`,
defaultValue: 0,
});
if (counter > responses.length - 1) counter = 0;
await lib.twitch.chat['@1.0.0'].messages.create({
channel_id: `${context.params.event.broadcaster_id}`,
content: `${responses[counter]}`,
});
counter = counter + 1;
await lib.keyvalue.store['@0.1.16'].set({
key: `bot_mention_counter_${context.params.event.broadcaster_id}`,
value: counter,
});