For the complete documentation index, see llms.txt. This page is also available as Markdown.

😉emojiInfo

emojiInfo(emoji: string): { 
    include: boolean, 
    matchs: RegExpMatchArray | null, 
    groups: Array<{ animated: 'a' | undefined, name: string, id: string } | null> | null
}

Search emoji information in a string:

const { discord } = require('regex-simplify');

const emoji = discord.emojiInfo(`
    <:booster:858775773876060160>
    <:ping:833077145773277214>
    <a:all_badges:851127998270930964>
`);

console.log(emoji);
{
  include: true,
  matchs: [
    '<:booster:858775773876060160>',   
    '<:ping:833077145773277214>',      
    '<a:all_badges:851127998270930964>'
  ],
  groups: [
    [Object: null prototype] {
      animated: undefined,
      name: 'booster',
      id: '858775773876060160'
    },
    [Object: null prototype] {
      animated: undefined,
      name: 'ping',
      id: '833077145773277214'
    },
    [Object: null prototype] {
      animated: 'a',
      name: 'all_badges',
      id: '851127998270930964'
    }
  ]
}

Last updated