From 98874dd7e75f29ef3b94b9e286b06bbd7c211154 Mon Sep 17 00:00:00 2001 From: DjDeveloperr Date: Mon, 15 Feb 2021 13:38:07 +0530 Subject: [PATCH] fix --- mod.ts | 1 + src/structures/slash.ts | 2 +- src/types/slash.ts | 5 +---- src/utils/dict.ts | 3 +++ 4 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 src/utils/dict.ts diff --git a/mod.ts b/mod.ts index bc096bb..bdfbde3 100644 --- a/mod.ts +++ b/mod.ts @@ -134,3 +134,4 @@ export { UserFlags } from './src/types/userFlags.ts' export type { VoiceStatePayload } from './src/types/voice.ts' export type { WebhookPayload } from './src/types/webhook.ts' export * from './src/models/collectors.ts' +export type { Dict } from './src/utils/dict.ts' diff --git a/src/structures/slash.ts b/src/structures/slash.ts index 99a1308..1e4003c 100644 --- a/src/structures/slash.ts +++ b/src/structures/slash.ts @@ -7,7 +7,6 @@ import { } from '../types/channel.ts' import { INTERACTION_CALLBACK, WEBHOOK_MESSAGE } from '../types/endpoint.ts' import { - Dict, InteractionApplicationCommandData, InteractionApplicationCommandOption, InteractionChannelPayload, @@ -18,6 +17,7 @@ import { InteractionType, SlashCommandOptionType } from '../types/slash.ts' +import { Dict } from '../utils/dict.ts' import { Permissions } from '../utils/permissions.ts' import { SnowflakeBase } from './base.ts' import { Channel } from './channel.ts' diff --git a/src/types/slash.ts b/src/types/slash.ts index 69eea51..f8a8ecd 100644 --- a/src/types/slash.ts +++ b/src/types/slash.ts @@ -1,3 +1,4 @@ +import { Dict } from '../utils/dict.ts' import { AllowedMentionsPayload, ChannelTypes, @@ -25,10 +26,6 @@ export interface InteractionChannelPayload { type: ChannelTypes } -export interface Dict { - [name: string]: T -} - export interface InteractionApplicationCommandResolvedPayload { users?: Dict members?: Dict diff --git a/src/utils/dict.ts b/src/utils/dict.ts new file mode 100644 index 0000000..6ffaaf3 --- /dev/null +++ b/src/utils/dict.ts @@ -0,0 +1,3 @@ +export interface Dict { + [name: string]: T +}