mirror of
https://github.com/sern-handler/handler
synced 2026-06-27 18:22:14 +00:00
refactor: remove dependence on discord.js for module stoore
This commit is contained in:
@@ -9,9 +9,13 @@ export abstract class Context<Left, Right> {
|
||||
|
||||
}
|
||||
|
||||
function safeUnwrap<T>(res: Either<T, T>) {
|
||||
return res.val;
|
||||
}
|
||||
|
||||
export function wrap<Left, Right>(
|
||||
val: Left|Right,
|
||||
fa: (val: Left|Right
|
||||
) => Either<Left, Right>) {
|
||||
fa: (val: Left|Right) => Either<Left, Right>
|
||||
) {
|
||||
return fa(val);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,23 @@
|
||||
import type { CommandModule } from '../../types/module';
|
||||
import { ApplicationCommandType, ComponentType } from 'discord.js';
|
||||
import type { Processed } from '../../types/handler';
|
||||
|
||||
const enum ApplicationCommandType {
|
||||
User,
|
||||
Message,
|
||||
ChatInput
|
||||
}
|
||||
|
||||
const enum ComponentType {
|
||||
ActionRow = 1,
|
||||
Button = 2,
|
||||
StringSelect = 3,
|
||||
TextInput = 4,
|
||||
UserSelect = 5,
|
||||
RoleSelect = 6,
|
||||
MentionableSelect = 7,
|
||||
ChannelSelect = 8,
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 2.0.0
|
||||
* Storing all command modules
|
||||
|
||||
Reference in New Issue
Block a user