decord/source/modules/messages/ApplicationCommands.tsx

41 lines
1.1 KiB
TypeScript
Raw Normal View History

// Module ID: 8084
// Function ID: 8085
// Name: ApplicationCommands
2026-07-29 08:29:29 +00:00
// Dependencies: [32, 2]
2026-07-20 16:05:17 +00:00
// Exports: getApplicationCommand
// Module 8084 (ApplicationCommands)
import _slicedToArray from "module_32" /* 32 */;
2026-07-23 10:11:24 +00:00
const re1 = /<\/([^\s]+):(\d+)>(?:\s?(.*))?/;
const size = fn(2);
const result = size.fileFinishedImporting("modules/messages/ApplicationCommands.tsx");
2026-07-20 16:05:17 +00:00
export const getApplicationCommand = function getApplicationCommand(content) {
const match = re1.exec(content);
2026-07-20 16:05:17 +00:00
if (null == match) {
return null;
} else {
[r10025, tmp7, tmp8, tmp9] = match;
2026-07-20 16:05:17 +00:00
let tmp2 = null;
2026-07-29 08:29:29 +00:00
if (null != tmp7) {
2026-07-20 16:05:17 +00:00
tmp2 = null;
2026-07-29 08:29:29 +00:00
if (null != tmp8) {
2026-07-20 16:05:17 +00:00
let str2 = "";
2026-07-29 08:29:29 +00:00
if (null != tmp9) {
2026-07-20 16:05:17 +00:00
const _HermesInternal = HermesInternal;
2026-07-29 08:29:29 +00:00
str2 = " " + tmp9;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const obj = { content: null, name: null, id: null, hasOptions: null };
2026-07-20 16:05:17 +00:00
const _HermesInternal2 = HermesInternal;
obj.content = "/" + tmp7 + str2;
obj.name = tmp7;
obj.id = tmp8;
obj.hasOptions = null != tmp9 && "" !== tmp9;
2026-07-20 16:05:17 +00:00
tmp2 = obj;
}
}
return tmp2;
}
};