moving handler files

This commit is contained in:
jacoobes
2022-02-07 01:10:31 -06:00
parent 38336590f1
commit 0781ab200a
4 changed files with 7 additions and 7 deletions

View File

@@ -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({

View File

@@ -1,5 +1,5 @@
import { Err, Ok, Result } from "ts-results";
import type { possibleOutput } from "../../../types/handler/handler";
import type { possibleOutput } from "../../../types/handler";

View File

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

View File

@@ -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`