Commit 6c98a4e5 authored by evgen moruzhenko's avatar evgen moruzhenko
Browse files

changed project structure

parent 053538d6
import { Module } from '@nestjs/common'; import { Module } from '@nestjs/common';
import { BotModule } from './bot/bot.module'; import { DiscordBotModule } from './discord-bot/discord-bot.module';
@Module({ @Module({
controllers: [], controllers: [],
providers: [], providers: [],
imports: [BotModule], imports: [DiscordBotModule],
}) })
export class AppModule {} export class AppModule {}
...@@ -2,11 +2,11 @@ import { Injectable, Logger } from '@nestjs/common'; ...@@ -2,11 +2,11 @@ import { Injectable, Logger } from '@nestjs/common';
import { Once, ClientProvider, Client, OnCommand } from 'discord-nestjs'; import { Once, ClientProvider, Client, OnCommand } from 'discord-nestjs';
import { Message, MessageEmbed } from 'discord.js'; import { Message, MessageEmbed } from 'discord.js';
import game from './tic-tac-toe/game'; import game from '../tic-tac-toe/game';
@Injectable() @Injectable()
export class BotGateway { export class DiscordBotGateway {
private readonly logger = new Logger(BotGateway.name); private readonly logger = new Logger(DiscordBotGateway.name);
@Client() @Client()
discordProvider: ClientProvider; discordProvider: ClientProvider;
......
import { Module } from '@nestjs/common'; import { Module } from '@nestjs/common';
import { DiscordModule } from 'discord-nestjs'; import { DiscordModule } from 'discord-nestjs';
import { BotGateway } from './bot.gateway'; import { DiscordBotGateway } from './discord-bot.gateway';
import { DiscordConfigService } from '../configs/discord.config'; import { DiscordConfigService } from '../configs/discord.config';
...@@ -11,6 +11,6 @@ import { DiscordConfigService } from '../configs/discord.config'; ...@@ -11,6 +11,6 @@ import { DiscordConfigService } from '../configs/discord.config';
useClass: DiscordConfigService, useClass: DiscordConfigService,
}), }),
], ],
providers: [BotGateway], providers: [DiscordBotGateway],
}) })
export class BotModule {} export class DiscordBotModule {}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment