decord/source/modules/applications/ApplicationInteractionInfoUtils.tsx

33 lines
1.1 KiB
TypeScript
Raw Normal View History

// Module ID: 11690
// Function ID: 11691
// Name: ApplicationInteractionInfoUtils
// Dependencies: [1894, 2]
2026-07-20 16:05:17 +00:00
// Exports: canViewInteractionInfo, isPrimaryEntryPointCommandMessage
// Module 11690 (ApplicationInteractionInfoUtils)
import Server from "Server" /* 1894 */;
import size from "module_2" /* 2 */;
2026-08-24 06:08:38 +00:00
const result = size.fileFinishedImporting("modules/applications/ApplicationInteractionInfoUtils.tsx");
2026-07-20 16:05:17 +00:00
export const canViewInteractionInfo = function canViewInteractionInfo(message) {
return null != message.interactionMetadata;
};
export const isPrimaryEntryPointCommandMessage = function isPrimaryEntryPointCommandMessage(message) {
const interactionMetadata = message.interactionMetadata;
2026-07-20 16:05:17 +00:00
let type;
2026-07-29 08:29:29 +00:00
if (interactionMetadata != null) {
2026-07-20 16:05:17 +00:00
type = interactionMetadata.type;
}
let tmp4 = type === Server.InteractionTypes.APPLICATION_COMMAND;
2026-07-29 08:29:29 +00:00
if (tmp4) {
const interactionMetadata2 = message.interactionMetadata;
2026-07-20 16:05:17 +00:00
let command_type;
2026-07-29 08:29:29 +00:00
if (interactionMetadata2 != null) {
2026-07-20 16:05:17 +00:00
command_type = interactionMetadata2.command_type;
}
tmp4 = command_type === Server.ApplicationCommandType.PRIMARY_ENTRY_POINT;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp4;
2026-07-20 16:05:17 +00:00
};