jowsey / discord.js-menu

💬 Create Discord.js embed-menus, with customizable reactions and unlimited pages.
https://npm.im/discord.js-menu
MIT License
120 stars 19 forks source link

can now use any number type (0-9) in emoji fields #7

Closed Jupiternerd closed 3 years ago

Jupiternerd commented 3 years ago

Line#4 stores emojiNumbers as an array of emoji unicode.

line #21 - #27 loops through reactions to check for nums and switch it out with the emoji number stored in line#4.

Jupiternerd commented 3 years ago

Just messed around with custom emojis. Since its also just numbers it breaks this system.

Jupiternerd commented 3 years ago

but it can still be done if we allow [2] etc.. in the emoji field. then we can parse it using regex with string.match("([\d*])".