mirror of
https://gitlab.com/pancakes1234/wdiscordbotserver.git
synced 2025-06-16 07:14:21 -06:00
355 lines
9.8 KiB
HTML
355 lines
9.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>WDiscordBot Modding Wiki</title>
|
|
<style>
|
|
/* Enable smooth scrolling for anchor links */
|
|
html {
|
|
scroll-behavior: smooth;
|
|
}
|
|
body {
|
|
font-family: Arial, sans-serif;
|
|
line-height: 1.6;
|
|
margin: 0;
|
|
padding: 0; /* Remove extra padding to let navbar span full width */
|
|
background-color: #212112; /* Light grey (fallback) background */
|
|
}
|
|
/* Particle background container */
|
|
#particles-js {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
z-index: -1;
|
|
}
|
|
/* Translucent Navbar that spans full width */
|
|
.navbar {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
background-color: rgba(0, 0, 0, 0.7); /* Translucent */
|
|
padding: 15px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
box-sizing: border-box;
|
|
z-index: 1000;
|
|
}
|
|
.navbar a {
|
|
color: #fff;
|
|
text-decoration: none;
|
|
padding: 10px 15px;
|
|
font-size: 18px;
|
|
}
|
|
.navbar a:hover {
|
|
background-color: rgba(255, 255, 255, 0.2);
|
|
border-radius: 5px;
|
|
}
|
|
.nav-links {
|
|
display: flex;
|
|
gap: 15px;
|
|
}
|
|
/* Acrylic effect for header, main, and footer */
|
|
header, main, footer {
|
|
background: rgba(255, 255, 255, 0.7);
|
|
backdrop-filter: blur(10px);
|
|
-webkit-backdrop-filter: blur(10px);
|
|
}
|
|
/* Header appears below the fixed navbar */
|
|
header {
|
|
margin-top: 80px; /* Offset height for navbar */
|
|
text-align: center;
|
|
padding: 20px 0;
|
|
}
|
|
header h1 {
|
|
margin: 0;
|
|
}
|
|
/* Main content styling with acrylic effect */
|
|
main {
|
|
background: rgba(255, 255, 255, 0.9);
|
|
padding: 20px;
|
|
margin: 20px;
|
|
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
border-radius: 10px;
|
|
}
|
|
section {
|
|
margin-bottom: 30px;
|
|
}
|
|
pre, code {
|
|
background-color: #eee;
|
|
padding: 10px;
|
|
overflow: auto;
|
|
display: block;
|
|
white-space: pre-wrap;
|
|
margin: 10px 0;
|
|
font-family: Consolas, "Courier New", monospace;
|
|
border-radius: 4px;
|
|
}
|
|
/* Footer styling with acrylic effect */
|
|
footer {
|
|
background: rgba(51, 51, 51, 0.9);
|
|
color: #fff;
|
|
padding: 20px 10px;
|
|
text-align: center;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<!-- Particle Effect Background -->
|
|
<div id="particles-js"></div>
|
|
|
|
<!-- Navbar -->
|
|
<div class="navbar">
|
|
<a href="https://discordbot.learnhelp.cc" target="_blank">Home</a>
|
|
<div class="nav-links">
|
|
<a href="#introduction">Introduction</a>
|
|
<a href="#cog-system">Cog System</a>
|
|
<a href="#directory-structure">Structure</a>
|
|
<a href="#guidelines">Guidelines</a>
|
|
<a href="#files-to-avoid">Files to Avoid</a>
|
|
<a href="#creating-cogs">Creating Cogs</a>
|
|
<a href="#testing">Testing</a>
|
|
<a href="#contributing">Contributing</a>
|
|
<a href="#conclusion">Conclusion</a>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Title Header -->
|
|
<header>
|
|
<h1>WDiscordBot Modding Wiki</h1>
|
|
<p><em>Last Updated: April 2025</em></p>
|
|
</header>
|
|
|
|
<!-- Main Content -->
|
|
<main>
|
|
<section id="introduction">
|
|
<h2>Introduction</h2>
|
|
<p>
|
|
WDiscordBot is an open-source bot designed for customization. This guide explains how to safely modify its features while preserving critical functionality.
|
|
</p>
|
|
</section>
|
|
|
|
<section id="cog-system">
|
|
<h2>Understanding the Cog System</h2>
|
|
<p>
|
|
The cog system allows modular bot functionality by separating commands, event listeners, and utilities into isolated components.
|
|
</p>
|
|
</section>
|
|
|
|
<section id="directory-structure">
|
|
<h2>Directory Structure and Core Components</h2>
|
|
<pre>
|
|
/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)
|
|
</pre>
|
|
</section>
|
|
|
|
<section id="guidelines">
|
|
<h2>Guidelines for Modding Cogs</h2>
|
|
<ul>
|
|
<li>Use version control to track changes.</li>
|
|
<li>Avoid modifying core files; instead, extend functionality.</li>
|
|
<li>Follow coding conventions for consistency.</li>
|
|
<li>Implement robust error handling.</li>
|
|
<li>Keep modifications modular for easier debugging.</li>
|
|
</ul>
|
|
</section>
|
|
|
|
<section id="files-to-avoid">
|
|
<h2>Files to Avoid Editing</h2>
|
|
<p>
|
|
Do not edit the following files, as they are critical:
|
|
</p>
|
|
<ul>
|
|
<li><code>cogs/core.py</code></li>
|
|
<li><code>cogs/debug.py</code></li>
|
|
<li><code>cogs/debug2.py</code></li>
|
|
<li><code>cogs/cog2.py</code></li>
|
|
<li><code>cogs/cogupdate.py</code></li>
|
|
</ul>
|
|
</section>
|
|
|
|
<section id="creating-cogs">
|
|
<h2>Creating and Integrating New Cogs</h2>
|
|
<p>
|
|
To add new features, create a new cog file, following this template:
|
|
</p>
|
|
<pre>
|
|
// 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))
|
|
</pre>
|
|
</section>
|
|
|
|
<section id="testing">
|
|
<h2>Testing and Debugging Your Mods</h2>
|
|
<ul>
|
|
<li>Test locally before deploying.</li>
|
|
<li>Write unit and integration tests.</li>
|
|
<li>Monitor logs to detect errors.</li>
|
|
</ul>
|
|
</section>
|
|
|
|
<section id="contributing">
|
|
<h2>Contributing</h2>
|
|
<p>
|
|
We welcome contributions to WDiscordBot! Please follow these steps:
|
|
</p>
|
|
<ul>
|
|
<li><strong>Fork the Repository:</strong> Click on the "Fork" button in the GitHub repository to create your copy.</li>
|
|
<li><strong>Clone Your Fork:</strong> Use <code>git clone <https://github.com/pancakes-proxy/wdiscordbot.git></code> to download your fork locally.</li>
|
|
<li><strong>Create a Branch:</strong> Always create a new branch for your changes, using a clear and descriptive name.</li>
|
|
<li><strong>Implement Your Changes:</strong> Follow the project's coding guidelines and update documentation where necessary. Don't forget to add tests for any new functionality.</li>
|
|
<li><strong>Submit a Pull Request:</strong> Once your changes pass local testing, submit a pull request to the main repository with a detailed explanation of your modifications.</li>
|
|
<li><strong>Participate in Code Review:</strong> Engage in discussions, address feedback, and adjust your changes as needed.</li>
|
|
<li><strong>Stay Synchronized:</strong> Regularly pull updates from the upstream repository to keep your fork up-to-date and avoid merge conflicts.</li>
|
|
</ul>
|
|
<p>
|
|
For questions or further guidance, join our Discord community or refer to the repository's issue tracker.
|
|
</p>
|
|
</section>
|
|
|
|
<section id="conclusion">
|
|
<h2>Conclusion</h2>
|
|
<p>
|
|
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.
|
|
</p>
|
|
</section>
|
|
</main>
|
|
|
|
<footer>
|
|
<p>© 2025 WDiscordBot - All Rights Reserved.</p>
|
|
</footer>
|
|
|
|
<!-- Load Particles.js Library -->
|
|
<script src="https://cdn.jsdelivr.net/npm/particles.js@2.0.0/particles.min.js"></script>
|
|
<!-- Initialize Particle Effect -->
|
|
<script>
|
|
particlesJS("particles-js", {
|
|
"particles": {
|
|
"number": {
|
|
"value": 80,
|
|
"density": {
|
|
"enable": true,
|
|
"value_area": 800
|
|
}
|
|
},
|
|
"color": {
|
|
"value": "#ffffff"
|
|
},
|
|
"shape": {
|
|
"type": "circle",
|
|
"stroke": {
|
|
"width": 0,
|
|
"color": "#000000"
|
|
},
|
|
"polygon": {
|
|
"nb_sides": 5
|
|
}
|
|
},
|
|
"opacity": {
|
|
"value": 0.5,
|
|
"random": false
|
|
},
|
|
"size": {
|
|
"value": 3,
|
|
"random": true
|
|
},
|
|
"line_linked": {
|
|
"enable": true,
|
|
"distance": 150,
|
|
"color": "#ffffff",
|
|
"opacity": 0.4,
|
|
"width": 1
|
|
},
|
|
"move": {
|
|
"enable": true,
|
|
"speed": 6,
|
|
"direction": "none",
|
|
"random": false,
|
|
"straight": false,
|
|
"out_mode": "out",
|
|
"bounce": false
|
|
}
|
|
},
|
|
"interactivity": {
|
|
"detect_on": "canvas",
|
|
"events": {
|
|
"onhover": {
|
|
"enable": true,
|
|
"mode": "repulse"
|
|
},
|
|
"onclick": {
|
|
"enable": true,
|
|
"mode": "push"
|
|
},
|
|
"resize": true
|
|
},
|
|
"modes": {
|
|
"grab": {
|
|
"distance": 400,
|
|
"line_linked": {
|
|
"opacity": 1
|
|
}
|
|
},
|
|
"bubble": {
|
|
"distance": 400,
|
|
"size": 40,
|
|
"duration": 2,
|
|
"opacity": 8,
|
|
"speed": 3
|
|
},
|
|
"repulse": {
|
|
"distance": 200,
|
|
"duration": 0.4
|
|
},
|
|
"push": {
|
|
"particles_nb": 4
|
|
},
|
|
"remove": {
|
|
"particles_nb": 2
|
|
}
|
|
}
|
|
},
|
|
"retina_detect": true
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|