Skip to content

BENZOOgataga/Template-Discordpy-Bot

Repository files navigation

Discord Bot Template

A clean, modern Discord bot template built with discord.py.

🚀 Features

  • Modern Command Structure: Using both traditional prefix commands and slash commands
  • Organized Codebase: Modular design with cogs for easy expansion
  • Ready for Development: Example commands and utilities included
  • Configuration System: Simple JSON-based configuration

🛠️ Setup Instructions

Prerequisites

  • Python 3.11+
  • discord.py 2.5.0+
  • Dependencies listed in requirements.txt

Quick Start

  1. Fork this repository
  2. Install dependencies:
    pip install -r requirements.txt
  3. Copy .env.example to .env and update with your bot token:
    cp .env.example .env
  4. Edit .env with your Discord Bot Token and preferred prefix
  5. Copy .config.json.example to .config.json and update with your Discord User ID:
    cp .config.json.example config.json
  6. Edit config.json with your Discord User ID

Configuration

The config.json file contains the following settings:

  • owner_ids: Your Discord user ID (for owner-only commands)
  • prefix: Command prefix for traditional commands (e.g., "!")
  • version: Version of your bot (if you want to track the version with Discord commands maybe?)

The .env file contains the following values:

  • TOKEN: Your Discord bot token, never share it, never show it, strictly keep it for yourself.

🚀 Running the Bot

Run the bot with:

python main.py

📂 Project Structure

Discord-Bot/
├── cogs/           # Command modules
├── utils/          # Utility functions
├── main.py         # Bot entry point
├── config.json     # Bot configuration
├── .env            # Sensitive information (Bot token)
└── README.md       # This file

Caution

Never give your bot token to anyone. Never show your .env file on a screenshot or screenshare.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A template for a discord.py bot, prebuilt with slash commands, using cogs.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors

Languages