You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Command handling currently is causing a lot of database queries, which linearly scale up with the amount of commands for a specific event type from Discord.js.
Explanation:
Discord.Client sends us the event message
We have 8 commands with the the message event type
Once the CommandManager is created, we create a handler for each of the 8 commands on the message event (this.client.on('message'...)
In each of those handlers, before we execute the command, we check if command.name is enabled in the database, causing 8 queries with the arrival of a single message from Discord.
ToDo / Goals:
Find a way to drastically minimize database queries to as low as possible. (Caching/etc.?)
The text was updated successfully, but these errors were encountered:
Command handling currently is causing a lot of database queries, which linearly scale up with the amount of commands for a specific event type from Discord.js.
Explanation:
message
message
event typeCommandManager
is created, we create a handler for each of the 8 commands on themessage
event (this.client.on('message'...
)command.name
is enabled in the database, causing 8 queries with the arrival of a single message from Discord.ToDo / Goals:
The text was updated successfully, but these errors were encountered: