Edit: This is mostly no longer valid given current plans for 0.0.8
Index.js will be rewritten into an actual cli application with parameters. Before, I didn't see a point in doing this, but now it's necessary to implement better handling of configuration, tokens, and sandplate's modularity.
Rather than the current control-flow wheras index.js statically runs bot.js, the new system will be dynamic. Rather than a single file, you'll control what file runs, written by yourself
bot.js will still exist, and it will still retain it's current "basic discord bot" usecase if you wish to use that
What's currently handled by the bot.js file will be moved elsewhere, made more modular and intentionally used by the developer
Much of what the configuration is used for or part of defaultData will be refactored as part of the client options or other methods
Dynamic data such as configured modules, guild and user groups, and so on will be moved to a better storage method, likely a database using keyv or another module. This will allow for per user and guild settings to be implemented.
The preferred method for configuration outside of code will be an enviroment variable file, and installation may involve configuring one
The preferred methods to store your bots token will be the aformentioned enviroment variable file or the new token parameter
It will be possible to use choose which enviroment file to use. This will, in part, allow for multiple bot accounts to be used without conflict from the same codebase. If you have no need of this, don't worry, as it won't interfere with normal usage.
The main arguments will likely be -t, --token for passing in a token and -e, --env for choosing the enviroment to use, but both may be done programmatically in your code.
Minor side note, all this would also fulfill #16's purpose, as setting up your bot.env file will be part of installation.
Edit: This is mostly no longer valid given current plans for 0.0.8
Index.js will be rewritten into an actual cli application with parameters. Before, I didn't see a point in doing this, but now it's necessary to implement better handling of configuration, tokens, and sandplate's modularity.Rather than the current control-flow wheras index.js statically runs bot.js, the new system will be dynamic. Rather than a single file, you'll control what file runs, written by yourselfbot.js will still exist, and it will still retain it's current "basic discord bot" usecase if you wish to use thatIt will be possible to use choose which enviroment file to use. This will, in part, allow for multiple bot accounts to be used without conflict from the same codebase. If you have no need of this, don't worry, as it won't interfere with normal usage.The main arguments will likely be-t
,--token
for passing in a token and-e
,--env
for choosing the enviroment to use, but both may be done programmatically in your code.Minor side note, all this would also fulfill #16's purpose, as setting up your bot.env file will be part of installation.