import { Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { HealthController, createHealthProvider } from '@manacore/matrix-bot-common';
import { BotModule } from './bot/bot.module';
import { PlantaModule } from './planta/planta.module';
import configuration from './config/configuration';

@Module({
	imports: [
		ConfigModule.forRoot({
			isGlobal: true,
			load: [configuration],
		}),
		BotModule,
		PlantaModule,
	],
	controllers: [HealthController],
	providers: [createHealthProvider('matrix-planta-bot')],
})
export class AppModule {}
