Are command instance recreated every time someone use the associate slash command ?

Hello I was wondering : imagine i have a simple ping slash command who return "pong". Will sapphire recreate an instance of my Ping class (who register the command) every time do /ping or not ?
Solution:
From my understanding; No, they're created at load time and then just saved to the command store and ran through that
Jump to solution
3 Replies
WeeskyBDW
WeeskyBDWOP8mo ago
why i ask that : i want to call a function at bot start for checking if env vars was set properly so i can prevent command to run if not
Solution
KaydaFox
KaydaFox8mo ago
From my understanding; No, they're created at load time and then just saved to the command store and ran through that
WeeskyBDW
WeeskyBDWOP8mo ago
Thx oh mb just tested and yeah they are init at load time and then reused
Want results from more Discord servers?
Add your server