removed ugly formatting

This commit is contained in:
mmacierzanka committed 2021-09-05 16:43:22 +02:00
1 parent 1938e4c12f
commit 6a0b8f3197
6 files changed
-15

No files matched your search

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