If you mention a role it then the bot reacts with an emoji Example: @otaku then the bot will react with the emoji you choose
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
let hasMentionedRole = context.params.event.mention_roles.find(
(mentionedRoleId) => {
return mentionedRoleId === ``; // put the role id here
}
);
if (hasMentionedRole) {
let result = await lib.discord.channels['@0.2.0'].messages.reactions.create({
emoji: '🥰', // You can also put custom emoji
message_id: `${context.params.event.id}`,
channel_id: `${context.params.event.channel_id}`//you can put a channel id if you only want it to react in that channel,
});
}