decord/alpha/source/modules/applications/ApplicationInteractionInfoUtils.tsx

35 lines
1.2 KiB
TypeScript
Raw Normal View History

2026-10-08 09:57:35 +00:00
// Module ID: 9595
// Function ID: 9596
// Name: ApplicationInteractionInfoUtils
2026-10-08 09:57:35 +00:00
// Dependencies: [5438, 1997, 2]
2026-07-20 16:05:17 +00:00
// Exports: canViewInteractionInfo, isPrimaryEntryPointCommandMessage
2026-10-08 09:57:35 +00:00
// Module 9595 (ApplicationInteractionInfoUtils)
import InteractionTypes from "InteractionTypes" /* 5438 */;
import size from "module_2" /* 2 */;
2026-08-24 06:08:38 +00:00
2026-10-06 11:16:32 +00:00
let tmp2;
2026-10-08 09:57:35 +00:00
const Server = tmp2(1997);
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;
}
2026-10-06 11:16:32 +00:00
let tmp4 = type === InteractionTypes.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
};