mirror of
https://github.com/sern-handler/handler
synced 2026-06-27 18:22:14 +00:00
moving handler files
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type { Arg, Context, ParseType, Visibility } from "../types/handler/handler";
|
||||
import type { Arg, Context, ParseType, Visibility } from "../types/handler";
|
||||
import * as Files from "./utils/readFile"
|
||||
import type { ApplicationCommandOptionData, Awaitable, Client, CommandInteraction, Message } from "discord.js";
|
||||
import type { possibleOutput } from "../types/handler/handler"
|
||||
import type { possibleOutput } from "../types/handler"
|
||||
import { Ok, Result, None, Some } from "ts-results";
|
||||
import type * as Utils from "./utils/preprocessors/args";
|
||||
import { CtxHandler } from "./utils/ctxHandler";
|
||||
@@ -56,8 +56,8 @@ export class Handler {
|
||||
interaction: CommandInteraction): Promise<possibleOutput | undefined> {
|
||||
|
||||
if (module === undefined) return "Unknown slash command!";
|
||||
const name = Array.from(Files.Commands.keys()).find(it => it === interaction.commandName)!;
|
||||
|
||||
const name = Array.from(Files.Commands.keys()).find(it => it === interaction.commandName);
|
||||
if(name === undefined) return `Could not find ${interaction.commandName} command!`;
|
||||
(await this.client.guilds.fetch(this.privateServerId))
|
||||
.commands
|
||||
.create({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Err, Ok, Result } from "ts-results";
|
||||
import type { possibleOutput } from "../../../types/handler/handler";
|
||||
import type { possibleOutput } from "../../../types/handler";
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as Sern from "./handler/sern";
|
||||
import * as Utils from "./handler/utils/preprocessors/args"
|
||||
import * as Types from "./types/handler/handler"
|
||||
import * as Types from "./types/handler"
|
||||
module.exports = { Sern, Utils, Types };
|
||||
export { Sern, Utils, Types };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Option } from 'ts-results'
|
||||
import type { CommandInteraction, CommandInteractionOptionResolver, Message, MessagePayload, MessageOptions } from 'discord.js';
|
||||
import type { Sern } from '../../handler/sern';
|
||||
import type { Sern } from '../handler/sern';
|
||||
|
||||
export type Visibility = "private" | "public"
|
||||
//Anything that can be sent in a `<TextChannel>#send` or `<CommandInteraction>#reply`
|
||||
Reference in New Issue
Block a user