Discord Server Admin (Pro)
A complete, enterprise-grade Discord server management skill. Everything a real server admin needs — from basic moderation to AutoMod, webhooks, templates, audit logs, and beyond.
🚀 Quick Start
CODEBLOCK0
📋 Command Reference
1. Server Intelligence
CODEBLOCK1
2. Channel Management (All Types)
CODEBLOCK2
3. Role Management (Advanced)
CODEBLOCK3
4. Member Management
CODEBLOCK4
5. AutoMod (Pro Feature)
CODEBLOCK5
6. Message Management
CODEBLOCK6
7. Webhooks (Advanced)
CODEBLOCK7
8. Emojis & Stickers
CODEBLOCK8
9. Soundboard (Beta)
CODEBLOCK9
10. Scheduled Events
CODEBLOCK10
11. Invites
CODEBLOCK11
12. Audit Logs
CODEBLOCK12
13. Thread Management
CODEBLOCK13
14. Stage Channels
CODEBLOCK14
15. Integration Management
CODEBLOCK15
16. Guild Settings
CODEBLOCK16
17. Widget Management
CODEBLOCK17
18. Moderation Logging
CODEBLOCK18
19. Bulk/Mass Operations
CODEBLOCK19
20. Template Operations
CODEBLOCK20
⚙️ Configuration
Environment Variables
CODEBLOCK21
Required Permissions
Option A: Administrator (easiest)
- - Requires:
ADMINISTRATOR permission
Option B: Granular permissions
CODEBLOCK22
Rate Limiting
The script handles Discord's rate limits automatically:
- - 1 req/1s per channel for message sends
- 50 req/10s for other operations
- Exponential backoff on 429 errors
- Global rate limit detection
📊 Examples
Complete Server Setup
CODEBLOCK23
Daily Moderation Routine
CODEBLOCK24
🔧 Troubleshooting
Common Errors
| Error | Solution |
|---|
| INLINECODE1 | Check your bot token |
| INLINECODE2 |
Bot lacks permissions |
|
404: Not Found | Invalid channel/guild/role ID |
|
429: Too Many Requests | Wait, script handles this |
|
50013: Missing Permissions | Bot role is below target role |
|
50001: Missing Access | Bot can't see the channel |
Debug Mode
CODEBLOCK25
📝 Notes
- - 14-day limit: Bulk delete only works on messages from the last 14 days
- Role hierarchy: Bot role must be higher than target roles
- Ownership: Some operations require server owner
- Vanity URLs: Require
DISCOVERABLE feature and boosts - Templates: Only available to users with INLINECODE8
- Audit logs: Only viewable by bots with
VIEW_AUDIT_LOG, retention is 90 days
🤖 Supported API Endpoints
- - Guilds & Guild Members
- Channels & Threads
- Roles & Permissions
- Messages & Reactions
- AutoModeration Rules
- Webhooks
- Invites & Vanity URLs
- Guild Templates
- Emojis & Stickers
- Guild Scheduled Events
- Stage Instances
- Soundboard Sounds
- Audit Logs
- Integrations
- Guild Widgets
- Application Commands (partial)
Discord 服务器管理(专业版)
一个完整的企业级 Discord 服务器管理技能。从基础管理到自动审核、Webhook、模板、审计日志等,真正的服务器管理员所需的一切。
🚀 快速开始
bash
设置机器人令牌
export DISCORD
BOTTOKEN=你的机器人令牌
赋予脚本可执行权限
chmod +x discord-admin.sh
查看所有命令
./discord-admin.sh --help
📋 命令参考
1. 服务器信息
bash
完整服务器概览
./discord-admin.sh server-info <服务器ID>
服务器自定义邀请链接(如已启用)
./discord-admin.sh vanity-get <服务器ID>
设置自定义邀请链接(需要可发现 + 助推)
./discord-admin.sh vanity-set <服务器ID> <代码>
服务器模板操作
./discord-admin.sh template-list <服务器ID> # 列出模板
./discord-admin.sh template-create <服务器ID> <名称> # 创建模板
./discord-admin.sh template-use <代码> # 从模板创建服务器
2. 频道管理(所有类型)
bash
列出所有频道(按分类组织)
./discord-admin.sh channel-list <服务器ID>
创建频道
./discord-admin.sh channel-create <服务器ID> <名称> text # 文字频道
./discord-admin.sh channel-create <服务器ID> <名称> voice # 语音频道
./discord-admin.sh channel-create <服务器ID> <名称> category # 分类
./discord-admin.sh channel-create <服务器ID> <名称> forum # 论坛
./discord-admin.sh channel-create <服务器ID> <名称> stage # 舞台
./discord-admin.sh channel-create <服务器ID> <名称> announcements # 公告
编辑频道(所有设置)
./discord-admin.sh channel-edit <服务器ID> <频道ID> name:<新名称> topic:<主题>
./discord-admin.sh channel-edit <服务器ID> <频道ID> nsfw:true rateLimit:60
频道权限
./discord-admin.sh channel-perms <服务器ID> <频道ID> # 查看权限
./discord-admin.sh channel-perms-set <服务器ID> <频道ID> <角色ID> allow:<权限> deny:<权限>
./discord-admin.sh channel-perms-overwrite <服务器ID> <频道ID> <目标ID> <类型:role|user> allow:<权限> deny:<权限>
删除频道
./discord-admin.sh channel-delete <服务器ID> <频道ID>
批量操作
./discord-admin.sh channel-prune <服务器ID> <天数:7> # 删除未使用的频道
3. 角色管理(高级)
bash
列出所有角色及层级
./discord-admin.sh role-list <服务器ID>
创建角色并设置完整权限
./discord-admin.sh role-create <服务器ID> <名称> color:#FF5500 permissions:ADMINISTRATOR
./discord-admin.sh role-create <服务器ID> <名称> permissions:MANAGE
CHANNELS,KICKMEMBERS,BAN_MEMBERS
编辑角色
./discord-admin.sh role-edit <服务器ID> <角色ID> name:<名称> color:<十六进制颜色>
./discord-admin.sh role-edit <服务器ID> <角色ID> hoist:true mentionable:true
./discord-admin.sh role-edit <服务器ID> <角色ID> permissions:+MANAGE_MESSAGES,-ADMINISTRATOR
位置管理(层级很重要!)
./discord-admin.sh role-position <服务器ID> <角色ID> <新位置>
删除角色
./discord-admin.sh role-delete <服务器ID> <角色ID>
批量角色操作
./discord-admin.sh role-assign-bulk <服务器ID> <角色ID> <用户ID1,用户ID2,...>
./discord-admin.sh role-remove-bulk <服务器ID> <角色ID> <用户ID1,用户ID2,...>
角色权限常量(逗号分隔):
ADMINISTRATOR, VIEWAUDITLOG, VIEWGUILDINSIGHTS, MANAGEGUILD, MANAGEROLES, MANAGECHANNELS, KICKMEMBERS, BANMEMBERS, CREATEINSTANTINVITE, CHANGENICKNAME, MANAGENICKNAMES, MANAGEEMOJIS, MANAGEWEBHOOKS, MANAGEGUILDEXPRESSIONS, USEAPPLICATIONCOMMANDS, MANAGEEVENTS, MODERATE_MEMBERS
4. 成员管理
bash
成员信息
./discord-admin.sh member-info <服务器ID> <用户ID>
昵称管理
./discord-admin.sh member-nick <服务器ID> <用户ID> <昵称>
./discord-admin.sh member-nick-reset <服务器ID> <用户ID>
超时(禁言)- Discord 原生功能
./discord-admin.sh member-timeout <服务器ID> <用户ID> <时长:60s|1h|1d|7d>
./discord-admin.sh member-untimeout <服务器ID> <用户ID>
踢出
./discord-admin.sh member-kick <服务器ID> <用户ID> [原因]
封禁(带选项)
./discord-admin.sh member-ban <服务器ID> <用户ID> [原因] [删除消息天数:0-7]
./discord-admin.sh member-ban-temp <服务器ID> <用户ID> <时长:7d> [原因]
解封
./discord-admin.sh member-unban <服务器ID> <用户ID> [原因]
批量管理
./discord-admin.sh ban-list <服务器ID> # 列出所有封禁
./discord-admin.sh kick-bulk <服务器ID> <用户ID1,用户ID2,...> [原因]
./discord-admin.sh ban-bulk <服务器ID> <用户ID1,用户ID2,...> [原因]
头像管理
./discord-admin.sh member-avatar-set <服务器ID> <用户ID> <图片URL>
5. 自动审核(专业功能)
bash
列出自动审核规则
./discord-admin.sh automod-list <服务器ID>
创建自动审核规则
./discord-admin.sh automod-create <服务器ID> <名称> \
keyword:坏词,垃圾信息,诈骗 \
presets:SLUR,SEXUAL,PROFANITY \
actions:BLOCK_MESSAGE,ALERT, timeout:60s
关键词过滤器
./discord-admin.sh automod-keyword <服务器ID> <规则名称> add:坏词,冒犯性词汇
./discord-admin.sh automod-keyword <服务器ID> <规则名称> remove:坏词
./discord-admin.sh automod-keyword <服务器ID> <规则名称> clear:true
预设过滤器(Discord 提供)
./discord-admin.sh automod-preset <服务器ID> <规则名称> SLUR,SEXUAL,PROFANITY,VIOLENCE
正则表达式模式
./discord-admin.sh automod-regex <服务器ID> <规则名称> pattern:(?i)(https?://\S+)
阻止列表
./discord-admin.sh automod-blocklist <服务器ID> <规则名称> add:自定义阻止列表名称
操作配置
./discord-admin.sh automod-actions <服务器ID> <规则名称> \
ALERT \
BLOCK_MESSAGE \
timeout:60s \
timeoutDuration:300 \
channelId:123456789
编辑/删除规则
./discord-admin.sh automod-edit <服务器ID> <规则ID> enabled:false
./discord-admin.sh automod-delete <服务器ID> <规则ID>
6. 消息管理
bash
发送消息
./discord-admin.sh msg-send <频道ID> <内容>
./discord-admin.sh msg-embed <频道ID> {title:标题,description:世界,color:65280}
发送带附件
./discord-admin.sh msg-send-file <频道ID> <文件路径> [消息]
编辑消息
./discord-admin.sh msg-edit <频道ID> <消息ID> <新内容>
删除消息
./discord-admin.sh msg-delete <频道ID> <消息ID>
./discord-admin.sh msg-delete-bulk <频道ID> <消息ID1,消息ID2,...>
./discord-admin.sh msg-delete-range <频道ID> <之前消息ID> [限制:100]
批量删除(14天限制)
./discord-admin.sh msg-prune <频道ID> [天数:7]
搜索消息
./discord-admin.sh msg-search <服务器ID> <查询> [频道ID]
./discord-admin.sh msg-search-user <