decord/source/modules/channel_autocomplete/ChannelAutocompleteConstants.tsx

44 lines
1.4 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 6847
// Function ID: 6848
2026-07-24 07:16:23 +00:00
// Name: regExp
2026-07-23 10:11:24 +00:00
// Dependencies: [2]
2026-07-28 08:39:19 +00:00
// Exports: extractGameMentionIds, formatGameMentionRaw, formatGameMentionToken
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
// Module 6847 (regExp)
import set from "set" /* 2 */;
2026-07-24 07:16:23 +00:00
let closure_0 = [];
2026-07-20 16:05:17 +00:00
const tmp2 = /^<@\$(\d+)>/;
const regExp = new RegExp(tmp2.source.replace(/^\^/, ""), "g");
2026-08-24 06:08:38 +00:00
const result = set.fileFinishedImporting("modules/channel_autocomplete/ChannelAutocompleteConstants.tsx");
2026-07-20 16:05:17 +00:00
export const MENTION_SENTINEL = "@";
2026-07-24 07:16:23 +00:00
export const GAME_MENTION_SENTINEL = "$";
2026-07-20 16:05:17 +00:00
export const CHANNEL_SENTINEL = "#";
export const EMOJI_SENTINEL = ":";
export const REACTION_START_SENTINEL = "+:";
export const REACTION_END_SENTINEL = ":";
export const COMMAND_SENTINEL = "/";
2026-07-24 07:16:23 +00:00
export const GAME_MENTION_INPUT_PREFIX = "@game:";
2026-07-20 16:05:17 +00:00
export const formatGameMentionRaw = function formatGameMentionRaw(arg0) {
return "<@$" + arg0 + ">";
};
2026-07-28 08:39:19 +00:00
export const formatGameMentionToken = function formatGameMentionToken(arg0) {
return "$" + arg0;
};
2026-07-20 16:05:17 +00:00
export const GAME_MENTION_RAW_RE = tmp2;
export const GAME_MENTION_RAW_RE_GLOBAL = regExp;
2026-07-24 07:16:23 +00:00
export const extractGameMentionIds = function extractGameMentionIds(arr) {
if (arr.includes("<@$")) {
const items = [];
HermesBuiltin.arraySpread(arr.matchAll(regExp), 0);
let mapped = items.map((arg0) => arg0[1]);
if (mapped.length <= 0) {
mapped = closure_0;
}
return mapped;
} else {
return closure_0;
}
};