decord/source/modules/applications/ApplicationInteractionInfoUtils.tsx

33 lines
1.2 KiB
TypeScript
Raw Normal View History

// Module ID: 11551
// Function ID: 11552
2026-07-20 16:05:17 +00:00
// Name: canViewInteractionInfo
2026-09-02 09:53:35 +00:00
// Dependencies: [1954, 2]
2026-07-20 16:05:17 +00:00
// Exports: canViewInteractionInfo, isPrimaryEntryPointCommandMessage
// Module 11551 (canViewInteractionInfo)
2026-08-24 06:08:38 +00:00
import set from "set" /* 2 */;
2026-09-02 09:53:35 +00:00
import PermissionOverwriteType from "PermissionOverwriteType" /* 1954 */;
2026-08-24 06:08:38 +00:00
const result = set.fileFinishedImporting("modules/applications/ApplicationInteractionInfoUtils.tsx");
2026-07-20 16:05:17 +00:00
export const canViewInteractionInfo = function canViewInteractionInfo(message) {
return null != message.interactionMetadata;
};
2026-09-03 10:05:34 +00:00
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-08-24 06:08:38 +00:00
let tmp4 = type === PermissionOverwriteType.InteractionTypes.APPLICATION_COMMAND;
2026-07-29 08:29:29 +00:00
if (tmp4) {
2026-09-03 10:05:34 +00:00
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;
}
2026-08-24 06:08:38 +00:00
tmp4 = command_type === PermissionOverwriteType.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
};