Archived
removed ugly formatting
This commit is contained in:
1 parent
1938e4c12f
commit
6a0b8f3197
6 files changed
-15
No files matched your search
@@ -9,7 +9,6 @@ import { ParameterType } from "./types/Parameter.js";
|
||||
*/
|
||||
export class PermissionsError extends Error {
|
||||
private readonly command: BaseCommand;
|
||||
|
||||
private readonly user: GuildMember | null;
|
||||
|
||||
constructor(command: BaseCommand, user?: GuildMember | null) {
|
||||
@@ -29,7 +28,6 @@ export class PermissionsError extends Error {
|
||||
*/
|
||||
export class ParameterTypeError extends TypeError {
|
||||
private readonly stringContent: string;
|
||||
|
||||
private readonly type: ParameterType;
|
||||
|
||||
constructor(s: string, type: ParameterType) {
|
||||
|
||||
@@ -13,9 +13,7 @@ import { CommandType } from "../types/BaseCommand.js";
|
||||
*/
|
||||
export class CommandManager {
|
||||
private readonly _chatCommandsList: TextCommand[] = [];
|
||||
|
||||
private readonly _messagesCommandsList: BaseCommand[] = [];
|
||||
|
||||
private readonly _userCommandsList: BaseCommand[] = [];
|
||||
|
||||
/**
|
||||
|
||||
@@ -47,9 +47,7 @@ export class BaseCommand {
|
||||
* @private
|
||||
*/
|
||||
private readonly function: CommandFunction;
|
||||
|
||||
private readonly permissionChecker: (i: Message | CommandInteraction) => boolean;
|
||||
|
||||
public static nameRegExp: RegExp = /^[a-zA-Z]{1,32}$/;
|
||||
|
||||
/**
|
||||
|
||||
@@ -42,9 +42,7 @@ export class TextCommand extends BaseCommand {
|
||||
* @type {boolean}
|
||||
*/
|
||||
public readonly slash: boolean;
|
||||
|
||||
public static nameRegExp: RegExp = /^[\w-]{1,32}$/;
|
||||
|
||||
public static descriptionRegExp: RegExp = /^[a-zA-Z]{1,100}$/;
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,15 +5,10 @@ import { PermissionCheckTypes, PermissionTypes } from "./permissions.js";
|
||||
|
||||
export interface BaseCommandInit {
|
||||
name: string;
|
||||
|
||||
guilds?: string[];
|
||||
|
||||
permissionCheck?: PermissionCheckTypes;
|
||||
|
||||
permissions?: PermissionTypes;
|
||||
|
||||
announceSuccess?: boolean;
|
||||
|
||||
function: CommandFunction;
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,6 @@ export interface TextCommandInit {
|
||||
|
||||
export interface CommandMessageStructure {
|
||||
command: TextCommand;
|
||||
|
||||
parameters: InputParameter[];
|
||||
}
|
||||
|
||||
@@ -99,6 +98,5 @@ export type GetMode = "ALL" | "PREFIX" | "NO_PREFIX";
|
||||
|
||||
export interface PhraseOccurrenceData {
|
||||
command: TextCommand;
|
||||
|
||||
type: "NAME" | "ALIAS";
|
||||
}
|
||||
Reference in new issue
Block a user