Having issues with getting the type of an interaction, how can I solve it?
export function interactionIsApplicationCommand<Cached extends CacheType = CacheType> (interaction: Interaction<Cached>): interaction is CommandInteraction<Cached> {
return interaction.type === InteractionType.ApplicationCommand;
}
gives this error in place of interaction is CommandInteraction<Cached>:
A type predicate's type must be assignable to its parameter's type.
Type 'CommandInteraction<Cached>' is not assignable to type 'Interaction<Cached>'.
Type 'CommandInteraction<Cached>' is missing the following properties from type 'UserContextMenuCommandInteraction<Cached>': targetUser, targetMember, targetId, resolveContextMenuOptionsts(2677)