diff --git a/src/bot.ts b/src/bot.ts index 684e8ecb4..ce5afaa05 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -569,9 +569,6 @@ export interface Helpers { guildBannerURL: typeof helpers.guildBannerURL; guildIconURL: typeof helpers.guildIconURL; guildSplashURL: typeof helpers.guildSplashURL; - isButton: typeof helpers.isButton; - isSelectMenu: typeof helpers.isSelectMenu; - isSlashCommand: typeof helpers.isSlashCommand; kickMember: typeof helpers.kickMember; leaveGuild: typeof helpers.leaveGuild; moveMember: typeof helpers.moveMember; @@ -739,9 +736,6 @@ export function createBaseHelpers(options: Partial) { guildBannerURL: options.guildBannerURL || helpers.guildBannerURL, guildIconURL: options.guildIconURL || helpers.guildIconURL, guildSplashURL: options.guildSplashURL || helpers.guildSplashURL, - isButton: options.isButton || helpers.isButton, - isSelectMenu: options.isSelectMenu || helpers.isSelectMenu, - isSlashCommand: options.isSlashCommand || helpers.isSlashCommand, kickMember: options.kickMember || helpers.kickMember, leaveGuild: options.leaveGuild || helpers.leaveGuild, moveMember: options.moveMember || helpers.moveMember, diff --git a/src/helpers/mod.ts b/src/helpers/mod.ts index 576d5933c..fc9739c28 100644 --- a/src/helpers/mod.ts +++ b/src/helpers/mod.ts @@ -113,9 +113,6 @@ import { editGuildTemplate } from "./templates/edit_guild_template.ts"; import { getGuildTemplates } from "./templates/get_guild_templates.ts"; import { getTemplate } from "./templates/get_template.ts"; import { syncGuildTemplate } from "./templates/sync_guild_template.ts"; -// Type Guards -import { isButton } from "./type_guards/is_button.ts"; -import { isSelectMenu } from "./type_guards/is_select_menu.ts"; import { createWebhook } from "./webhooks/create_webhook.ts"; import { deleteWebhook } from "./webhooks/delete_webhook.ts"; @@ -133,7 +130,6 @@ import { createStageInstance } from "./channels/create_stage_instance.ts"; import { updateStageInstance } from "./channels/update_stage_instance.ts"; import { getStageInstance } from "./channels/get_stage_instance.ts"; import { deleteStageInstance } from "./channels/delete_stage_instance.ts"; -import { isSlashCommand } from "./type_guards/is_slash_command.ts"; import { connectToVoiceChannel } from "./voice/connect_to_voice_channel.ts"; import { addToThread } from "./channels/threads/add_to_thread.ts"; @@ -263,9 +259,6 @@ export { guildBannerURL, guildIconURL, guildSplashURL, - isButton, - isSelectMenu, - isSlashCommand, kickMember, leaveGuild, moveMember, diff --git a/src/helpers/type_guards/is_button.ts b/src/helpers/type_guards/is_button.ts deleted file mode 100644 index 9b00f106c..000000000 --- a/src/helpers/type_guards/is_button.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { ButtonComponent } from "../../types/messages/components/button_component.ts"; -import type { ActionRoleComponents } from "../../types/messages/components/message_components.ts"; -import { MessageComponentTypes } from "../../types/messages/components/message_component_types.ts"; - -/** A type guard function to tell if it is a button component */ -export function isButton(component: ActionRoleComponents): component is ButtonComponent { - return component.type === MessageComponentTypes.Button; -} diff --git a/src/helpers/type_guards/is_select_menu.ts b/src/helpers/type_guards/is_select_menu.ts deleted file mode 100644 index 7643a0d0c..000000000 --- a/src/helpers/type_guards/is_select_menu.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { ActionRoleComponents } from "../../types/messages/components/message_components.ts"; -import { MessageComponentTypes } from "../../types/messages/components/message_component_types.ts"; -import type { SelectMenuComponent } from "../../types/messages/components/select_menu.ts"; - -/** A type guard function to tell if it is a button component */ -export function isSelectMenu(component: ActionRoleComponents): component is SelectMenuComponent { - return component.type === MessageComponentTypes.SelectMenu; -} diff --git a/src/helpers/type_guards/is_slash_command.ts b/src/helpers/type_guards/is_slash_command.ts deleted file mode 100644 index bba72dbeb..000000000 --- a/src/helpers/type_guards/is_slash_command.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Interaction, SlashCommandInteraction } from "../../types/interactions/interaction.ts"; -import { DiscordInteractionTypes } from "../../types/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; -}