Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/d4isdavid/discord.js-components-bot
Discord.js bot template with components system
https://github.com/d4isdavid/discord.js-components-bot
bot discord discord-bot discord-bot-template discord-js discordjs nodejs template typescript
Last synced: 3 months ago
JSON representation
Discord.js bot template with components system
- Host: GitHub
- URL: https://github.com/d4isdavid/discord.js-components-bot
- Owner: D4isDAVID
- License: mit
- Created: 2023-03-12T03:14:37.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-17T20:59:31.000Z (4 months ago)
- Last Synced: 2024-10-20T07:40:37.486Z (4 months ago)
- Topics: bot, discord, discord-bot, discord-bot-template, discord-js, discordjs, nodejs, template, typescript
- Language: TypeScript
- Homepage:
- Size: 203 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Discord.js Components Bot
This is a [discord.js] bot template with a components system.
It is written in [TypeScript], and uses [`@discordjs/core`][@discordjs/core].Out of the box, the template only adds a ping and some example commands.
Database support is also not included by default, and can be manually added.- [Key Features](#key-features)
- [Configuration](#configuration)
- [Scripts](#scripts)## Key Features
### Components System
Typically when developing Discord bots, we place handlers, events, commands,
interactions, etc. into their own respective folders.The components system creates a more organized way to store all related
events, commands and other interactions in their own folder
([see components](./src/components/)).### Interaction Utilities
The template comes with interaction utilities, allowing you to handle user
input with ease ([see example](./src/components/example/modal.ts)).### Subcommand Utilities
The template comes with subcommand utilities, allowing you to create commands
with subcommands and subcommand groups with ease
([see example](./src/components/example/commands/subcommands.ts)).### Stateful Interactions
The template comes with stateful modals & message components, allowing you to
handle simple state between interactions with ease
([see example](./src/components/example/stateful/stateful-modal.ts)).## Configuration
- Make a copy of the [`.env.example`](./.env.example) file
- Name the new copy `.env`
- Configure the file## Scripts
- `npm run lint` - Lint your code with [Prettier]
- `npm run format` - Format your code with [Prettier]
- `npm run build` - Build your code with the [TypeScript] compiler
- `npm run deploy` - Deploy commands to Discord
- `npm run start` - Start your bot[discord.js]: https://discord.js.org
[@discordjs/core]: https://discord.js.org/docs/packages/core/2.0.0
[prettier]: https://prettier.io
[typescript]: https://typescriptlang.org