Function: isAnyInteraction()
isAnyInteraction(
messageOrInteraction
:APIMessage
|BaseInteraction
|Message
):messageOrInteraction is BaseInteraction
Defined in: projects/utilities/packages/discord.js-utilities/src/lib/type-guards.ts:261
Checks whether the input messageOrInteraction
is one of Message or any class that
extends BaseInteraction. This generally boils down to being one of:
- Interaction
- AutocompleteInteraction
- ButtonInteraction
- ChannelSelectMenuInteraction
- ChatInputCommandInteraction
- CommandInteraction
- ContextMenuInteraction
- MentionableSelectMenuInteraction
- MessageComponentInteraction
- MessageContextMenuCommandInteraction
- ModalSubmitInteraction
- RoleSelectMenuInteraction
- SelectMenuInteraction
- StringSelectMenuInteraction
- UserContextMenuCommandInteraction
- UserSelectMenuInteraction
Parameters
Parameter | Type | Description |
---|---|---|
messageOrInteraction | APIMessage | BaseInteraction | Message | The message or interaction that should be checked. |
Returns
messageOrInteraction is BaseInteraction
true
if the messageOrInteraction
is an instanceof BaseInteraction, false
if it is not.