Fix typecheck

This commit is contained in:
Cadence Ember
2026-02-11 11:31:27 +13:00
parent 33eef25cf1
commit c4909653aa
21 changed files with 117 additions and 65 deletions
+2
View File
@@ -1,4 +1,5 @@
// @ts-check
/// <reference lib="dom" />
const Ty = require("../../types")
const DiscordTypes = require("discord-api-types/v10")
@@ -371,6 +372,7 @@ function linkEndOfMessageSpriteSheet(content) {
for (const mxc of endOfMessageEmojis) {
// We can do up to 2000 chars max. (In this maximal case it will get chunked to a separate message.) Ignore additional emojis.
const withoutMxc = mxUtils.makeMxcPublic(mxc)
assert(withoutMxc)
const emojisLength = params.toString().length + encodeURIComponent(withoutMxc).length + 2
if (content.length + emojisLength + afterLink.length > 2000) {
break