From c8230334f2085757a31c716b2e4e7027f32c4309 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Tue, 28 May 2024 13:43:56 -0500 Subject: [PATCH] fix typings --- src/core/structures/context.ts | 5 ++++- src/types/core-modules.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/structures/context.ts b/src/core/structures/context.ts index ef3b459..2313f6b 100644 --- a/src/core/structures/context.ts +++ b/src/core/structures/context.ts @@ -14,16 +14,19 @@ import * as assert from 'assert'; import type { ReplyOptions } from '../../types/utility'; import { fmt } from '../functions' +type ShitType = ChatInputCommandInteraction['options'] + /** * @since 1.0.0 * Provides values shared between * Message and ChatInputCommandInteraction */ export class Context extends CoreContext { - get options() { return this.interaction.options; } + args(type: 'message') : string[] + args(type: 'interaction') : ShitType //TODO args(type: 'message'|'interaction') { switch(type) { diff --git a/src/types/core-modules.ts b/src/types/core-modules.ts index acf4708..c887b78 100644 --- a/src/types/core-modules.ts +++ b/src/types/core-modules.ts @@ -24,7 +24,7 @@ import { Awaitable, SernEventsMapping } from './utility'; export type SDT = { state: Record; deps: Dependencies; - type: 'slash' | 'text', + type: CommandType, params?: string };