removed UserCommand file

This commit is contained in:
mmacierzanka committed 2021-09-08 22:40:55 +02:00
1 parent b8f08e87e3
commit 4b854950d1
6 files changed
+5 -29

No files matched your search

+1 -3
View File
@@ -1,7 +1,6 @@
import { Bot } from "./src/structures/Bot.js";
import { ChatCommand } from "./src/commands/ChatCommand.js";
import { MessageCommand } from "./src/commands/MessageCommand.js";
import { UserCommand } from "./src/commands/UserCommand.js";
import { MessageCommand } from "./src/commands/ContextMenuCommand.js";
import { InitOptions } from "./src/structures/types/Bot.js";
import { ChatCommandInit } from "./src/commands/types/ChatCommand.js";
import { HelpMessageParams } from "./src/commands/types/HelpMessage.js";
@@ -16,7 +15,6 @@ export {
Bot,
ChatCommand,
MessageCommand,
UserCommand,
InitOptions,
ChatCommandInit,
CommandInteractionData,
+1 -1
View File
@@ -4,7 +4,7 @@ import { CommandType, BaseCommandInit, CommandFunction } from "./types/BaseComma
import { OperationSuccess, PermissionsError } from "../errors.js";
import { BaseCommandObject } from "../structures/types/api.js";
import { ChatCommand } from "./ChatCommand.js";
import { MessageCommand } from "./MessageCommand.js";
import { MessageCommand } from "./ContextMenuCommand.js";
import { ParameterResolvable } from "../structures/types/Parameter.js";
import { TargetID } from "../structures/parameter.js";
+1 -1
View File
@@ -4,7 +4,7 @@ import { CommandNotFound } from "../errors.js";
import { applicationState } from "../state.js";
import { BaseCommand } from "./BaseCommand.js";
import { ChatCommand } from "./ChatCommand.js";
import { MessageCommand } from "./MessageCommand.js";
import { MessageCommand } from "./ContextMenuCommand.js";
import { CommandType } from "./types/BaseCommand.js";
import { CommandInteractionData } from "./types/commands.js";
File renamed without changes.
-21
View File
@@ -1,21 +0,0 @@
import { BaseCommandInit } from "./types/BaseCommand.js";
import { BaseCommand } from "./BaseCommand.js";
export class UserCommand extends BaseCommand {
public static nameRegExp: RegExp = /^.{1,32}$/;
constructor(o: BaseCommandInit) {
super("USER", {
name: o.name,
announceSuccess: o.announceSuccess,
function: o.function,
guilds: o.guilds,
permissionCheck: o.permissionCheck,
permissions: o.permissions,
});
}
public static isCommand(o: any): o is UserCommand {
return BaseCommand.isCommand(o) && UserCommand.nameRegExp.test(o.name);
}
}
+2 -3
View File
@@ -1,11 +1,10 @@
import { BaseCommand } from "../BaseCommand.js";
import { ChatCommand } from "../ChatCommand.js";
import { MessageCommand } from "../MessageCommand.js";
import { UserCommand } from "../UserCommand.js";
import { MessageCommand } from "../ContextMenuCommand.js";
import { ParameterResolvable } from "structures/types/Parameter.js";
import { TargetID } from "structures/parameter.js";
export type CommandResolvable = BaseCommand | ChatCommand | MessageCommand | UserCommand;
export type CommandResolvable = BaseCommand | ChatCommand | MessageCommand;
export interface CommandInteractionData {
command: BaseCommand;