WDiscordBot Modding Wiki

Last Updated: April 2025

Introduction

WDiscordBot is an open-source bot designed for customization. This guide explains how to safely modify its features while preserving critical functionality.

Understanding the Cog System

The cog system allows modular bot functionality by separating commands, event listeners, and utilities into isolated components.

Directory Structure and Core Components

/project-root
│
├──cogs
├── ai.py
├── application.py
├── automod.py
├── cog2.py
├── cogupdate.py
├── contribute.py
├── core.py
├── debug2.py
├── fun.py
├── howtohelp.py
├── issues.py
├── mod.py
├── rolemgt.py
├── roleplay.py
|── rule34.py
│
├── bot.py               // Main bot loader
        (ignore the rest thats just the readme and the website code)
      

Guidelines for Modding Cogs

Files to Avoid Editing

Do not edit the following files, as they are critical:

Creating and Integrating New Cogs

To add new features, create a new cog file, following this template:

// File: cogs/demo.py

from discord.ext import commands

class CustomMod(commands.Cog):
    def __init__(self, bot):
        self.bot = bot

    @commands.command(name="hello")
    async def hello_command(self, ctx):
        """Responds with a greeting."""
        await ctx.send("Hello, world!")

def setup(bot):
    bot.add_cog(CustomMod(bot))
      

Testing and Debugging Your Mods

Contributing

We welcome contributions to WDiscordBot! Please follow these steps:

For questions or further guidance, join our Discord community or refer to the repository's issue tracker.

Conclusion

Follow these best practices to keep WDiscordBot stable, mod-friendly, and open for contributions. By avoiding modifications to core files, using modular design, and adhering to contribution guidelines, you'll help foster a vibrant, collaborative community.