@ovencord/builders 1.12.2 → 1.12.3

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@ovencord/builders",
4
- "version": "1.12.2",
4
+ "version": "1.12.3",
5
5
  "description": "A set of builders that you can use when creating your bot",
6
6
  "scripts": {
7
7
  "test": "bun test",
@@ -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