| name | discord-server-management |
| description | Full Discord server management via REST API — channels, roles, members, permissions. Bot has ADMINISTRATOR access. |
| version | 2.0.0 |
| license | MIT |
| tags | ["discord","api","server","channels","roles","permissions"] |
Discord Server Management
Manage Discord guild via REST API v10. Bot has full ADMINISTRATOR access.
When to Use
- "buat channel", "hapus channel", "setup role", "atur permission"
- Create/delete/rename channels or categories
- Manage roles, set permission overwrites
Key Rule: Per-Agent Bot Tokens
Each agent has its own token. Agent X MUST use Agent X's token from Agent X's .env.
Preferred: discord_notify.py handles token routing automatically — just pass env_path.
API Quick Reference
Full endpoints, workflows, code examples → references/api_reference.md
Channel Map
Full category/channel IDs → references/channel_map.md
Post-Reorg Checklist
After ANY channel reorganization → references/post_reorg_checklist.md (9 steps)
⛔ NO WEBHOOKS (Apr 2026)
All webhooks removed. Standard: deliver="local" + send_embed() with agent's own bot token. Never create new webhooks.
⚠️ REST API Blocked by Cloudflare (Apr 2026)
Problem: Direct HTTP REST calls to Discord API from server get error 1010 (Access Denied) — Cloudflare blocks non-browser requests.
Solution: Use discord.py (websocket-based) instead of raw urllib/requests for any guild management operations (create/delete channels, roles, permissions).
import discord, asyncio
intents = discord.Intents.default()
intents.guilds = True
client = discord.Client(intents=intents)
@client.event
async def on_ready():
guild = client.get_guild(GUILD_ID)
cat = await guild.create_category('📰 NEWS')
ch = await guild.create_text_channel('channel-name', category=cat, topic='...')
await client.close()
asyncio.run(client.start(TOKEN))
Note: discord_notify.py (send_embed) still works because it uses a different code path. The block only affects direct REST API calls to discord.com/api/v10.
Multi-Agent Communication
Same bot token = cannot message each other (bots ignore own messages). Zeko + Nova share token → can't Discord-communicate. Workaround: separate bot per agent, webhook, shared storage, or owner relay.
Environment Variables
| Var | Purpose |
|---|
DISCORD_BOT_TOKEN | Bot token (per agent .env) |
DISCORD_HOME_CHANNEL | Bot's DM with owner (NOT guild channel) |
DISCORD_ALLOWED_USERS | Comma-separated allowed user IDs |
Pitfalls
18 documented pitfalls → references/pitfalls.md
See Also
discord-notify-library — discord_notify.py single source of truth
discord-thread-cleanup — close/delete threads
discord-bot-avatar — set bot avatar
discord-activity — set bot activity/status