📂 File Structure
Discord bots built with Robo.js follow the following file structure:
/src/commands: Slash commands. Can be nested for subcommands or subcommand groups./src/context: Context commands for either/useror/message./src/events: Discord events. Can be nested for grouped events.
Basic Example
/src
├── /commands
│ └── ping.js
└── /events
└── messageCreate.js
The above is used to create:
/pingcommand.messageCreateevent.
Advanced Example
/src
├── /commands
│ ├── ping.js
│ ├── /ban
│ │ └── user.js
│ └── /settings
│ └── /update
│ └── something.js
├── /context
│ ├── /user
│ │ └── Audit.js
│ └── /message
│ └── Report.js
└── /events
├── ready.js
└── /messageCreate
├── dm.js
└── hello.js
The above is used to create:
/pingcommand./ban usersubcommand./settings update somethingsubcommand group.Audituser context command.Reportmessage context command.readyevent.dmandhellogroupedmessageCreateevents.