mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 16:57:22 +00:00
add: isSlashCommand typeGuard
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import { Interaction, SlashCommandInteraction } from "../../interactions/interaction.ts";
|
||||
import { DiscordInteractionTypes } from "../../interactions/interaction_types.ts";
|
||||
|
||||
/** A type guard function to tell if it is a slash command interaction */
|
||||
export function isSlashCommand(interaction: Interaction): interaction is SlashCommandInteraction {
|
||||
return interaction.type === DiscordInteractionTypes.ApplicationCommand;
|
||||
}
|
||||
Reference in New Issue
Block a user