Skip to content

Commit

Permalink
fix typings
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoobes committed May 28, 2024
1 parent 792015a commit c823033
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/core/structures/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Message, ChatInputCommandInteraction> {

get options() {
return this.interaction.options;
}
args(type: 'message') : string[]
args(type: 'interaction') : ShitType
//TODO
args(type: 'message'|'interaction') {
switch(type) {
Expand Down
2 changes: 1 addition & 1 deletion src/types/core-modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { Awaitable, SernEventsMapping } from './utility';
export type SDT = {
state: Record<string,unknown>;
deps: Dependencies;
type: 'slash' | 'text',
type: CommandType,
params?: string
};

Expand Down

0 comments on commit c823033

Please sign in to comment.