Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | import { Module, OnApplicationBootstrap } from "@nestjs/common"; import { EventEmitter2, EventEmitterModule } from "@nestjs/event-emitter"; import { REST } from "discord.js"; import { GatewayEvents } from "./Gateway"; import { GuildEvents } from "./Guild"; import { ThreadEvents } from "./Thread"; @Module({ imports: [ EventEmitterModule.forRoot({ delimiter: ".", maxListeners: 10, }), ], providers: [GatewayEvents, GuildEvents, ThreadEvents], }) export class EventsModule implements OnApplicationBootstrap { public constructor( private readonly eventEmitter: EventEmitter2, private readonly rest: REST, ) {} public async onApplicationBootstrap() { this.eventEmitter.emit("rest", this.rest); } } |