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 };