d->m accept emojis with longer names

This commit is contained in:
Cadence Ember 2023-09-27 23:24:31 +13:00
commit ca988af2e0
4 changed files with 50 additions and 3 deletions

View file

@ -158,7 +158,7 @@ async function messageToEvent(message, guild, options = {}, di) {
// Handling emojis that we don't know about. The emoji has to be present in the DB for it to be picked up in the emoji markdown converter.
// So we scan the message ahead of time for all its emojis and ensure they are in the DB.
const emojiMatches = [...content.matchAll(/<(a?):([^:>]{2,20}):([0-9]+)>/g)]
const emojiMatches = [...content.matchAll(/<(a?):([^:>]{2,64}):([0-9]+)>/g)]
const emojiDownloads = []
for (const match of emojiMatches) {
const id = match[3]