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:Jump to solution
From my understanding; No, they're created at load time and then just saved to the command store and ran through that
3 Replies
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
From my understanding; No, they're created at load time and then just saved to the command store and ran through that
Thx
oh mb just tested and yeah they are init at load time and then reused