Use regex to capture emojis used and mentioned channel id in a discord messaged.
//Sample regex to narrow down the emojis used in a message both discord custom and default ones.
//Made by Lilac🍥Syringa🌸
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
//Apparently, the regex i'm using does not support emoji (face and hand) tones and specifically black cat emoji. In this case, it thinks they're the normal variant (the default yellow version).
let AllemojiContent = context.params.event.content.match(/(<:.+?:\d+>|(?<=<)a:.+?:\d+(?=>))|(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/g);
//All emojis
let DefaultemojiContent = context.params.event.content.match(/\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff]/g);
//Default only
let CustomemojiContent = context.params.event.content.match(/<:.+?:\d+>|(?<=<)a:.+?:\d+(?=>)/g);
//Discord custom emojis
console.log(AllemojiContent);
console.log(DefaultemojiContent);
console.log(CustomemojiContent);
//Some extra: Check for the id of mentioned channels.
let MentionedChannels = context.params.event.content.match(/(?<=<#)[0-9]*(?=>)/g);
console.log(MentionedChannels)