Archived
removed UserCommand file
This commit is contained in:
1 parent
b8f08e87e3
commit
4b854950d1
6 files changed
+5
-29
No files matched your search
@@ -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,
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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.
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user