Load modules
Modules in Sunar encapsulate related commands, signals and components, enabling efficient organization and management of your bot's capabilities. Learn how to leverage Sunar's modular architecture to streamline development and scalability.
Example
All you have to do is use the load
function and use a glob pattern:
Replace 'YOUR_DISCORD_BOT_TOKEN'
with your actual bot token obtained from the Discord Developer Portal.
If you are using ECMAScript modules, you can use the top-level await feature and avoid the start
function.
File structure
Here's an overview of the project's file structure to help you visualize how files are organized within Sunar.
ping.js
interaction-create.js
ready.js
index.js
Last updated on