Skip to content

Commit

Permalink
style: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
SocketSomeone committed Feb 28, 2023
1 parent b5d890a commit cebd133
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/commands/context-menus/context-menus.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ export class ContextMenusService implements OnModuleInit, OnApplicationBootstrap

public add(contextMenu: ContextMenuDiscovery): void {
const id = this.getId(contextMenu.getType(), contextMenu.getName());

if (this.contextMenus.has(id)) {
this.logger.warn(`ContextMenu with id : ${id} is already exists`);
}

this.contextMenus.set(id, contextMenu);
}

Expand Down
4 changes: 2 additions & 2 deletions src/commands/slash-commands/slash-commands.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { Reflector } from '@nestjs/core';
@Injectable()
export class SlashCommandsService implements OnModuleInit, OnApplicationBootstrap {
private readonly logger = new Logger(SlashCommandsService.name);

private readonly slashCommands = new Map<string, SlashCommandDiscovery>();

public constructor(
Expand Down Expand Up @@ -50,7 +50,7 @@ export class SlashCommandsService implements OnModuleInit, OnApplicationBootstra
if (this.slashCommands.has(command.getName())) {
this.logger.warn(`Slash Command : ${command.getName()} already exists`);
}

this.slashCommands.set(command.getName(), command);
}

Expand Down
6 changes: 3 additions & 3 deletions src/message-components/message-components.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { MESSAGE_COMPONENT_METADATA } from '../necord.constants';
@Injectable()
export class MessageComponentsService implements OnModuleInit, OnApplicationBootstrap {
private readonly logger = new Logger(MessageComponentsService.name);

private readonly components = new Map<string, MessageComponentDiscovery>();

public constructor(
Expand Down Expand Up @@ -44,11 +44,11 @@ export class MessageComponentsService implements OnModuleInit, OnApplicationBoot

public add(component: MessageComponentDiscovery) {
const name = this.componentName(component.getType(), component.getCustomId());

if (this.components.has(name)) {
this.logger.warn(`Message Component : ${name} already exists`);
}

this.components.set(name, component);
}

Expand Down
6 changes: 3 additions & 3 deletions src/modals/modals.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ModalDiscovery } from './modal.discovery';
@Injectable()
export class ModalsService implements OnModuleInit, OnApplicationBootstrap {
private readonly logger = new Logger(ModalsService.name);

private readonly modals = new Map<string, ModalDiscovery>();

public constructor(
Expand Down Expand Up @@ -35,11 +35,11 @@ export class ModalsService implements OnModuleInit, OnApplicationBootstrap {

public add(modal: ModalDiscovery) {
const id = modal.getCustomId();

if (this.modals.has(id)) {
this.logger.warn(`Modal : ${id} already exists`);
}

this.modals.set(id, modal);
}

Expand Down
6 changes: 3 additions & 3 deletions src/text-commands/text-commands.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { NecordModuleOptions } from '../necord-options.interface';
@Injectable()
export class TextCommandsService implements OnModuleInit, OnApplicationBootstrap {
private readonly logger = new Logger(TextCommandsService.name);

private readonly textCommands = new Map<string, TextCommandDiscovery>();

public constructor(
Expand Down Expand Up @@ -48,11 +48,11 @@ export class TextCommandsService implements OnModuleInit, OnApplicationBootstrap

public add(textCommand: TextCommandDiscovery) {
const name = textCommand.getName();

if (this.textCommands.has(name)) {
this.logger.warn(`TextCommand : ${name} already exists`);
}

this.textCommands.set(name, textCommand);
}

Expand Down

0 comments on commit cebd133

Please sign in to comment.