
foxxmd/context-mod本镜像提供一个基于snoowrap库开发的事件驱动型Reddit社区管理机器人,旨在通过自动化处理Reddit平台的内容审核、用户互动管理等moderation任务,帮助社区管理员提升管理效率,降低人工操作成本。
bashdocker run -d \ --name reddit-mod-bot \ -e REDDIT_CLIENT_ID="your_client_id_here" \ -e REDDIT_CLIENT_SECRET="your_client_secret_here" \ -e REDDIT_USER_AGENT="mod-bot/1.0 by your_username" \ -e REDDIT_USERNAME="your_reddit_username" \ -e REDDIT_PASSWORD="your_reddit_password" \ -v /local/path/to/rules.json:/app/rules.json \ [镜像名称]:latest
yamlversion: '3.8' services: reddit-mod-bot: image: [镜像名称]:latest container_name: reddit-mod-bot restart: unless-stopped environment: - REDDIT_CLIENT_ID=your_client_id_here - REDDIT_CLIENT_SECRET=your_client_secret_here - REDDIT_USER_AGENT=mod-bot/1.0 by your_username - REDDIT_USERNAME=your_reddit_username - REDDIT_PASSWORD=your_reddit_password - RULES_PATH=/app/rules.json volumes: - ./rules.json:/app/rules.json logging: driver: "json-file" options: max-size: "10m" max-file: "3"
| 环境变量 | 描述 | 数据类型 | 是否必需 | 默认值 |
|---|---|---|---|---|
| REDDIT_CLIENT_ID | Reddit API应用的Client ID | 字符串 | 是 | 无 |
| REDDIT_CLIENT_SECRET | Reddit API应用的Client Secret | 字符串 | 是 | 无 |
| REDDIT_USER_AGENT | 用于标识应用的用户代理字符串 | 字符串 | 是 | 无 |
| REDDIT_USERNAME | 具有moderator权限的Reddit账号用户名 | 字符串 | 是 | 无 |
| REDDIT_PASSWORD | Reddit账号密码 | 字符串 | 是 | 无 |
| RULES_PATH | 规则配置文件在容器内的路径 | 字符串 | 否 | /app/rules.json |
| POLL_INTERVAL | 事件轮询间隔(秒) | 整数 | 否 | 30 |
| LOG_LEVEL | 日志级别(debug/info/warn/error) | 字符串 | 否 | info |
规则文件采用JSON格式,支持配置帖子规则和评论规则,示例如下:
json{ "postRules": [ { "name": "prohibitedKeywords", "trigger": "titleOrBodyContains", "keywords": ["spam", "advertisement", "scam"], "action": "remove", "notifyUser": true, "notificationMessage": "您的帖子因包含违规内容已被移除。", "reportReason": "违反社区内容政策" }, { "name": "nsfwContent", "trigger": "isNSFW", "action": "flair", "flairText": "NSFW", "flairCSSClass": "nsfw-tag" } ], "commentRules": [ { "name": "hateSpeech", "trigger": "containsRegex", "pattern": "(racist|homophobic|xenophobic)", "action": "removeAndBan", "banDuration": 30, "banReason": "发表仇恨言论" } ] }





manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务