This is a powerful and flexible template for building Discord bots using ForgeScript, along with its ForgeCanvas and ForgeDB extensions. Designed for scalability and ease of use, this template provides a modular structure for managing commands, events, and other bot features.
- Modular Handler-Based Structure: Streamlined management of commands, events, and bot logic.
- Customizable Commands: Built-in support for both slash commands and optional prefix commands.
- Database Integration: Simple and effective data management with ForgeDB.
- Graphic Capabilities: Leverage ForgeCanvas for advanced graphical features.
- Invite Tracking: Out-of-the-box support for tracking guild invites.
- Secure Configuration: Manage sensitive information using
.env
.
src/
├── assets/ # Static assets (images, JSON files, etc.)
├── functions/ # Custom reusable functions for the bot
├── handlers/ # Bot functionality handlers
│ ├── ASCIIPrint.js # Prints ASCII art when the bot starts
│ ├── database.js # Database variables and utilities
│ ├── events.js # Event handlers for the bot
│ ├── InstalledPackages.js # Displays installed packages
│ ├── intents.js # Manages bot intents and permissions
├── Prefix Commands/ # (Optional) Prefix-based commands
├── Slash Commands/ # Slash commands for interactions
├── index.js # Main entry point of the bot
├── .env.example # Example environment configuration file
├── package.json # Project metadata and dependencies
Follow these steps to get started:
-
Clone the Repository:
git clone https://github.com/Zack-911/Atomic cd Atomic
-
Install Dependencies:
npm install
-
Set Up Environment Variables: Create a
.env
file in the root directory and add your bot token:BOT_TOKEN=your-discord-bot-token
-
(Optional) Clean Up Files: Delete unnecessary files (e.g.,
.idx
,LICENSE.md
,.gitignore
) if they aren't required for your project. -
(Optional) Relocate Files: Move all files into the root directory if you prefer not to use the
Atomic
folder structure. -
Run the Bot:
npm start or node src/index.js
Uses the figlet
library to display an ASCII art logo when the bot starts.
Manages database variables and configurations for ForgeDB.
Contains bot event handlers such as messageCreate
and guildMemberAdd
.
Displays installed packages for debugging or informational purposes.
Specifies the intents (permissions) required by the bot for Discord API interactions.
Use the .env
file to securely store sensitive data like your Discord bot token. Refer to .env.example
for an example configuration.
To enable prefix-based commands:
- Uncomment the
prefixCommandsPath
variable and theclient.commands.load(prefixCommandsPath)
line inindex.js
. - Add your custom prefix commands to the
Prefix Commands/
directory.
Add slash commands to the Slash Commands/
directory. These will be automatically loaded by the bot.
This project uses the following libraries:
This project is licensed under the MIT License. You are free to use, modify, and distribute this code under the terms of the license.
Contributions are welcome! Feel free to fork this repository, submit issues, or create pull requests to help improve this template.
- This template is a starting point and can be customized to fit your specific project requirements.
- Make sure to regularly update dependencies to stay secure and up-to-date.
Happy coding! 🎉