fjodor-rybakov / discord-nestjs

👾 NestJS package for discord.js
MIT License
270 stars 49 forks source link

PoC: Only one event listener for all commands #1152

Open 89Q12 opened 8 months ago

89Q12 commented 8 months ago

Currently for each command a new event listener is added, this is rather inconvenient as one easily reaches more than 10 handlers this way.

Having a map, that contains each command(Name, handler function), enables us to only use one event listener for all commands.

Therefore I made this quick PoC, I'm open to discussion and suggestions :)

References: #1002

89Q12 commented 7 months ago

I fixed the issues with my PoC and it is now executable, maybe if you could take another look?