fix(types)!: Fix discordeno/interactions.ts (#4360)

Co-authored-by: Link <link20050703@gmail.com>
This commit is contained in:
Fleny
2025-08-17 20:20:23 -07:00
committed by GitHub
co-authored by Link
parent d79e672f5a
commit 702b252396
2 changed files with 64 additions and 53 deletions
+8 -15
View File
@@ -1,14 +1,11 @@
import {
ApplicationCommandTypes,
type CreateApplicationCommand,
type CreateContextApplicationCommand,
type DiscordInviteCreate,
type DiscordInviteMetadata,
type GetMessagesAfter,
type GetMessagesAround,
type GetMessagesBefore,
type GetMessagesLimit,
type GetMessagesOptions,
import type {
DiscordInviteCreate,
DiscordInviteMetadata,
GetMessagesAfter,
GetMessagesAround,
GetMessagesBefore,
GetMessagesLimit,
GetMessagesOptions,
} from '@discordeno/types'
import { hasProperty } from './utils.js'
@@ -31,7 +28,3 @@ export function isGetMessagesLimit(options: GetMessagesOptions): options is GetM
export function isInviteWithMetadata(options: DiscordInviteCreate | DiscordInviteMetadata): options is DiscordInviteMetadata {
return !hasProperty(options, 'channel_id')
}
export function isContextApplicationCommand(command: CreateApplicationCommand): command is CreateContextApplicationCommand {
return command.type === ApplicationCommandTypes.Message || command.type === ApplicationCommandTypes.User
}