Skip to content

Zack-911/Atomic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord Bot Template (ForgeScript)

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.


Overview

Overview of terminal


✨ 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.

📂 Folder Structure

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

🚀 Installation

Follow these steps to get started:

  1. Clone the Repository:

    git clone https://github.com/Zack-911/Atomic
    cd Atomic
  2. Install Dependencies:

    npm install
  3. Set Up Environment Variables: Create a .env file in the root directory and add your bot token:

    BOT_TOKEN=your-discord-bot-token
    
  4. (Optional) Clean Up Files: Delete unnecessary files (e.g., .idx, LICENSE.md, .gitignore) if they aren't required for your project.

  5. (Optional) Relocate Files: Move all files into the root directory if you prefer not to use the Atomic folder structure.

  6. Run the Bot:

    npm start
      or
    node src/index.js

🛠️ Handlers Overview

ASCIIPrint.js

Uses the figlet library to display an ASCII art logo when the bot starts.

database.js

Manages database variables and configurations for ForgeDB.

events.js

Contains bot event handlers such as messageCreate and guildMemberAdd.

InstalledPackages.js

Displays installed packages for debugging or informational purposes.

intents.js

Specifies the intents (permissions) required by the bot for Discord API interactions.


⚙️ Environment Configuration

Use the .env file to securely store sensitive data like your Discord bot token. Refer to .env.example for an example configuration.


🛡️ Adding Prefix Commands

To enable prefix-based commands:

  1. Uncomment the prefixCommandsPath variable and the client.commands.load(prefixCommandsPath) line in index.js.
  2. Add your custom prefix commands to the Prefix Commands/ directory.

✍️ Adding Slash Commands

Add slash commands to the Slash Commands/ directory. These will be automatically loaded by the bot.


📦 Dependencies

This project uses the following libraries:


📜 License

This project is licensed under the MIT License. You are free to use, modify, and distribute this code under the terms of the license.


🤝 Contribution

Contributions are welcome! Feel free to fork this repository, submit issues, or create pull requests to help improve this template.


📝 Notes

  • 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! 🎉

About

A starting template for your discord bot made in forgescript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published