@ovencord/builders 1.12.2 → 1.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -57,9 +57,7 @@ export const sectionPredicate = z.object({
|
|
|
57
57
|
id: idPredicate,
|
|
58
58
|
components: z.array(textDisplayPredicate).min(1).max(3),
|
|
59
59
|
accessory: z.union([
|
|
60
|
-
buttonPredicate
|
|
61
|
-
message: 'Buttons used as section accessories must have a label.',
|
|
62
|
-
}),
|
|
60
|
+
buttonPredicate,
|
|
63
61
|
thumbnailPredicate,
|
|
64
62
|
]),
|
|
65
63
|
});
|
|
@@ -11,6 +11,8 @@ import type { APIMessageComponentEmoji } from 'discord-api-types/v10';
|
|
|
11
11
|
*/
|
|
12
12
|
export function parseEmoji(text: string): APIMessageComponentEmoji {
|
|
13
13
|
const decodedText = text.includes('%') ? decodeURIComponent(text) : text;
|
|
14
|
+
// Plain snowflake ID (e.g. '1465147007831380128') — treat as custom emoji ID
|
|
15
|
+
if (/^\d{17,21}$/.test(decodedText)) return { id: decodedText, name: undefined, animated: false };
|
|
14
16
|
if (!decodedText.includes(':')) return { animated: false, name: decodedText.replace(/\uFE0F/g, ''), id: undefined };
|
|
15
17
|
const match = /<?(?:(?<animated>a):)?(?<name>\w{2,32}):(?<id>\d{17,19})?>?/.exec(decodedText);
|
|
16
18
|
|