#Can I optimize this code or is it already optimized to the maximum?

7 messages · Page 1 of 1 (latest)

quasi rain

I tried to think of every way to optimize this code, but just couldn't. What do you suggest?
Also, can I maybe store the commands with the command code itself in the shard manager and pull the commands from it whenever I need them? I don't want to load the commands for every shard. What should I do? Thanks for helping

quick void

there's no "optimized to the maximum"
you can keep optimizing pretty much anything, but you get diminishing returns
it's just about how optimal is optimal enough

changing == to === would improve correctnes quite a bit and optimize it marginally

(== is shit, don't use == unless you absolutely know its exact behavior)

you're using any a lot, you shouldn't do that

this code needs correctness improvements before optimization

also this is quite complex and involved, i doubt many people are gonna be willing to go through to understand your entire code to provide detailed feedback about optimization