mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
fix(types)!: Fix discordeno/interactions.ts (#4360)
Co-authored-by: Link <link20050703@gmail.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user