compile into single file

Bundling the bot into a single file fails because sapphire loads commands/listeners files when run, not via import. Is there a simple setting in the bot to statically import all the commands?
26 Replies
24
242y ago
What is the reason to deploy a single file?
chmod
chmod2y ago
works easier with the hosting provider. can't change this circumstance, need static imports, but don't see any docs on that
24
242y ago
I don't think you can override that
chmod
chmod2y ago
you're saying this would require editing the sapphire framework?
24
242y ago
More like not supported? It revolves around pieces which are loaded at runtime
chmod
chmod2y ago
how necessary are those pieces to be loaded at runtime though
24
242y ago
considering that's how every single part of sapphire works really rough
Ben
Ben2y ago
Everything in sapphire is a piece
24
242y ago
yeah basically it's built around pieces as modules you just add more moduels to load more commands or your own modules you don't bundle really
Ben
Ben2y ago
It would seem your best option is to use a hosting provider that allows you to have more than one file
24
242y ago
in fact I'd say bundling is probably an anti pattern here
chmod
chmod2y ago
huh well ty for preventing me from wasting hours to mold sapphire to do that
24
242y ago
yeah wouldn't want that
chmod
chmod2y ago
still gotta somehow get it bundled unfortunately. ill find another way ig
24
242y ago
maybe you're going down the wrong path take a closer look at your hosting solution maybe you're not limited
Want results from more Discord servers?
Add your server