๐ 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.
- dmand- hellogrouped- messageCreateevents.