Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/source/dev_guide/api/getting_started.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Getting Start with the API!
==========================================================

Getting Start with the API is easy. You can use the API to get information about the bot and its features. You can also use the API to get information about the bot's features. You can also use the API to get information about the bot's features.

first read this:

`→ Open Publics Endpoints <publics_endpoints.rst>`_
15 changes: 15 additions & 0 deletions docs/source/dev_guide/api/publics_endpoints.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Publics Endpoints
==========================================================

All Publics Endpoints of ManagerX.

+------------+------------+------------+--------------------------------------+
| Endpoint | Method | Description |
+============+============+============+======================================+
| /v1/managerx/stats | GET | Returns the stats of the bot |
+------------+------------+------------+--------------------------------------+
| /v1/managerx/leaderboard| GET | Returns the leaderboard of the bot |
+------------+------------+------------+--------------------------------------+
| /v1/managerx/version | GET | Returns the version of the bot |
+------------+------------+------------+--------------------------------------+

Empty file.
17 changes: 7 additions & 10 deletions docs/source/dev_guide/index.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
Developer Guide
======================
Welcome to the Developer Guide for ManagerX.
==========================================================

Welcome to the ManagerX Developer Guide! This guide provides everything you need to understand the inner workings of ManagerX, contribute to its development, and extend its functionality.

Whether you're looking to set up a local development environment, explore the architecture, build new features, or deploy your own instance — you'll find all the information here.
learn about the API, the Dashboard, the Bot and more.

.. toctree::
:maxdepth: 2
:caption: Contents
:caption: API:

Quick Start <getting_started/fast_setting_up>
architecture/index
contributing/index
deployment/index
Getting Started <api/getting_started>
Public Endpoints <api/publics_endpoints>

12 changes: 11 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,14 @@ We welcome contributions from the community! Whether it's bug reports, feature r
---

**© 2026 ManagerX Development**
*Version 2.0.0-dev | Last Updated: December 7, 2025*
*Version 2.0.0-dev | Last Updated: December 7, 2025*

.. toctree::
:maxdepth: 2
:caption: User Guide:

user_guide/index
:maxdepth: 2
:caption: Developer Guide:

Developer Guide <dev_guide/index>
48 changes: 42 additions & 6 deletions src/api/dashboard/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,13 @@

# Check if user is in guild and has appropriate permissions (Manage Guild or Admin)
member = guild.get_member(int(user["id"]))
if not member or not (member.guild_permissions.manage_guild or member.guild_permissions.administrator):
if not member:
try:
member = await guild.fetch_member(int(user["id"]))
except:
raise HTTPException(status_code=403, detail="Nutzer nicht auf dem Server gefunden")

if not (member.guild_permissions.manage_guild or member.guild_permissions.administrator):
raise HTTPException(status_code=403, detail="Insufficient permissions")

channels = [
Expand All @@ -183,7 +189,13 @@
raise HTTPException(status_code=404, detail="Guild not found or bot not in guild")

member = guild.get_member(int(user["id"]))
if not member or not (member.guild_permissions.manage_guild or member.guild_permissions.administrator):
if not member:
try:
member = await guild.fetch_member(int(user["id"]))
except:

Check notice on line 195 in src/api/dashboard/routes.py

View check run for this annotation

codefactor.io / CodeFactor

src/api/dashboard/routes.py#L195

Do not use bare 'except'. (E722)
raise HTTPException(status_code=403, detail="Nutzer nicht auf dem Server gefunden")

if not (member.guild_permissions.manage_guild or member.guild_permissions.administrator):
raise HTTPException(status_code=403, detail="Insufficient permissions")

roles = [
Expand All @@ -203,7 +215,13 @@
raise HTTPException(status_code=404, detail="Guild not found or bot not in guild")

member = guild.get_member(int(user["id"]))
if not member or not (member.guild_permissions.manage_guild or member.guild_permissions.administrator):
if not member:
try:
member = await guild.fetch_member(int(user["id"]))
except:

Check notice on line 221 in src/api/dashboard/routes.py

View check run for this annotation

codefactor.io / CodeFactor

src/api/dashboard/routes.py#L221

Do not use bare 'except'. (E722)
raise HTTPException(status_code=403, detail="Nutzer nicht auf dem Server gefunden")

if not (member.guild_permissions.manage_guild or member.guild_permissions.administrator):
raise HTTPException(status_code=403, detail="Insufficient permissions")

categories = [
Expand All @@ -223,7 +241,13 @@
raise HTTPException(status_code=404, detail="Guild not found or bot not in guild")

member = guild.get_member(int(user["id"]))
if not member or not (member.guild_permissions.manage_guild or member.guild_permissions.administrator):
if not member:
try:
member = await guild.fetch_member(int(user["id"]))
except:

Check notice on line 247 in src/api/dashboard/routes.py

View check run for this annotation

codefactor.io / CodeFactor

src/api/dashboard/routes.py#L247

Do not use bare 'except'. (E722)
raise HTTPException(status_code=403, detail="Nutzer nicht auf dem Server gefunden")

if not (member.guild_permissions.manage_guild or member.guild_permissions.administrator):
raise HTTPException(status_code=403, detail="Insufficient permissions")

channels = [
Expand All @@ -243,7 +267,13 @@
raise HTTPException(status_code=404, detail="Guild not found or bot not in guild")

member = guild.get_member(int(user["id"]))
if not member or not (member.guild_permissions.manage_guild or member.guild_permissions.administrator):
if not member:
try:
member = await guild.fetch_member(int(user["id"]))
except:

Check notice on line 273 in src/api/dashboard/routes.py

View check run for this annotation

codefactor.io / CodeFactor

src/api/dashboard/routes.py#L273

Do not use bare 'except'. (E722)
raise HTTPException(status_code=403, detail="Nutzer nicht auf dem Server gefunden")

if not (member.guild_permissions.manage_guild or member.guild_permissions.administrator):
raise HTTPException(status_code=403, detail="Insufficient permissions")

# Fetch daily growth/activity
Expand Down Expand Up @@ -344,14 +374,20 @@
raise HTTPException(status_code=404, detail="Guild not found or bot not in guild")

member = guild.get_member(int(user["id"]))
if not member or not (member.guild_permissions.manage_guild or member.guild_permissions.administrator):
if not member:
try:
member = await guild.fetch_member(int(user["id"]))
except:

Check notice on line 380 in src/api/dashboard/routes.py

View check run for this annotation

codefactor.io / CodeFactor

src/api/dashboard/routes.py#L380

Do not use bare 'except'. (E722)
raise HTTPException(status_code=403, detail="Nutzer nicht auf dem Server gefunden")

if not (member.guild_permissions.manage_guild or member.guild_permissions.administrator):
raise HTTPException(status_code=403, detail="Insufficient permissions")

try:
# 1. Fetch Stats (reuse logic)
try:
stats = await get_guild_stats(guild_id, user)
except:

Check notice on line 390 in src/api/dashboard/routes.py

View check run for this annotation

codefactor.io / CodeFactor

src/api/dashboard/routes.py#L390

Do not use bare 'except'. (E722)
stats = {}

# 2. Fetch Settings
Expand Down
2 changes: 1 addition & 1 deletion src/web/components/AntiSpamSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default function AntiSpamSettings({ guildId }: { guildId: string }) {
const baseUrl = import.meta.env.VITE_API_URL || 'http://localhost:8040';

// Fetch Channels
const channelRes = await fetch(`${baseUrl}/dashboard/settings/${guildId}/channels`, {
const channelRes = await fetch(`${baseUrl}/dashboard/guilds/${guildId}/channels`, {
headers: { "Authorization": `Bearer ${token}` }
});
if (channelRes.ok) {
Expand Down
2 changes: 1 addition & 1 deletion src/web/components/GlobalChatSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function GlobalChatSettings({ guildId }: { guildId: string }) {
const baseUrl = import.meta.env.VITE_API_URL || 'http://localhost:8040';

// Fetch Channels
const channelRes = await fetch(`${baseUrl}/dashboard/settings/${guildId}/channels`, {
const channelRes = await fetch(`${baseUrl}/dashboard/guilds/${guildId}/channels`, {
headers: { "Authorization": `Bearer ${token}` }
});
if (channelRes.ok) {
Expand Down
2 changes: 1 addition & 1 deletion src/web/components/WelcomeSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default function WelcomeSettings({ guildId }: { guildId: string }) {
const base = "http://localhost:8040/dashboard/settings";

// Fetch Channels
const channelRes = await fetch(`${base}/${guildId}/channels`, {
const channelRes = await fetch(`http://localhost:8040/v1/managerx/dashboard/guilds/${guildId}/channels`, {
headers: { "Authorization": `Bearer ${token}` }
});
if (channelRes.ok) {
Expand Down
Loading