diff --git a/d2m/converters/expression.js b/d2m/converters/expression.js index 146a766..b10ff27 100644 --- a/d2m/converters/expression.js +++ b/d2m/converters/expression.js @@ -29,8 +29,9 @@ async function emojisToState(emojis) { }, url } + db.prepare("INSERT OR IGNORE INTO emoji (emoji_id, animated, mxc_url) VALUES (?, ?, ?)").run(emoji.id, +!!emoji.animated, url) }).catch(e => { - if (e.data.errcode === "M_TOO_LARGE") { // Lol. + if (e.data.errcode === "M_TOO_LARGE") { // Very unlikely to happen. Only possible for 3x-series emojis uploaded shortly after animated emojis were introduced, when there was no 256 KB size limit. return } console.error(`Trying to handle emoji ${emoji.name} (${emoji.id}), but...`)