decord/source/modules/messages/ApplicationCommands.tsx
2026-08-08 06:10:11 +00:00

42 lines
1.1 KiB
TypeScript

// Module ID: 8117
// Function ID: 8118
// Name: getApplicationCommand
// Dependencies: [32, 2]
// Exports: getApplicationCommand
// Module 8117 (getApplicationCommand)
import _slicedToArray from "_slicedToArray";
const re1 = /<\/([^\s]+):(\d+)>(?:\s?(.*))?/;
const result = require("set").fileFinishedImporting("modules/messages/ApplicationCommands.tsx");
export const getApplicationCommand = function getApplicationCommand(content) {
let tmp7;
let tmp8;
let tmp9;
const match = regex.exec(content);
if (null == match) {
return null;
} else {
[r10025, tmp7, tmp8, tmp9] = callback(match, 4);
let tmp2 = null;
if (null != tmp7) {
tmp2 = null;
if (null != tmp8) {
let str2 = "";
if (null != tmp9) {
const _HermesInternal = HermesInternal;
str2 = " " + tmp9;
}
const obj = { content: null, name: null, id: null, hasOptions: null };
const _HermesInternal2 = HermesInternal;
obj[0] = "/" + tmp7 + str2;
obj[1] = tmp7;
obj[2] = tmp8;
obj[3] = null != tmp9 && "" !== tmp9;
tmp2 = obj;
}
}
return tmp2;
}
};