-
Notifications
You must be signed in to change notification settings - Fork 20
Performance
Maintaining a large discord bot or even a bot in a large guild with good performance can be hard sometimes.
With gateway intents this solution can be solved, but there is a possibility that there is a problem
-
I would recommend you to try to disable caching you do not need or make your own type of cache, such as working with raw data events.
Object constructors are here in
objects
for a reason. (use theon_dispatch
event) -
If you are on a lot of guilds like 600 for example, you could try to shard your discord bot (read the sharding wiki for more information), that way it will at least split the events to different connections.
-
There is a new feature in Nim which is called ARC and ORC, though it would be risky since they are knew and can potentially cause bugs. Read more here.
-
You can set your message size limit (in bytes), which prevents large messages from being added to the cache; limits included too.