feat: add tools/discord.md (bot access, channel IDs, guild map, raw API); fix HEARTBEAT RSS→API for Gitea issues; sync all index files

This commit is contained in:
2026-05-31 00:42:04 -05:00
parent 5bf0a13164
commit 1090928ab7
5 changed files with 158 additions and 2 deletions
+2 -1
View File
@@ -38,7 +38,8 @@ llm-tools/
│ ├── local-llm.llm.md Local LLMs — Gemma-4-E4B (8080) + Gemma-4-26B (8081)
│ ├── claude-cli.md Claude Code CLI reference
│ ├── codex-cli.md OpenAI Codex CLI reference
── cursor-cli.md Cursor IDE/CLI reference
── cursor-cli.md Cursor IDE/CLI reference
│ └── discord.md Discord bot — read/send channels, IDs, guild map
├── agents/ Per-agent configuration and notes
│ ├── README.md
+1
View File
@@ -35,6 +35,7 @@ New agent? Read documents/onboarding.md first — it sequences the full orientat
claude-cli.md Claude Code CLI — commands, flags, MCP, local LLM usage
codex-cli.md OpenAI Codex CLI — install, approval modes, AGENTS.md
cursor-cli.md Cursor IDE/CLI — agent mode, rules, MCP, Gitea integration
discord.md Discord bot — read/send channels, guild/channel IDs, raw API
agents/ Per-agent configuration, context, and notes
README.md
+2 -1
View File
@@ -192,7 +192,8 @@
"claude-cli.md": "Claude Code CLI \u2014 install, commands, flags, MCP config, local LLM usage",
"codex-cli.md": "OpenAI Codex CLI \u2014 install, approval modes, AGENTS.md, local LLM usage",
"cursor-cli.md": "Cursor IDE/CLI \u2014 agent mode, rules, MCP, local LLM, Gitea integration",
"local-llm.llm.md": "Local LLMs \u2014 Gemma-4-E4B (8080) + Gemma-4-26B (8081), OpenAI-compatible API"
"local-llm.llm.md": "Local LLMs \u2014 Gemma-4-E4B (8080) + Gemma-4-26B (8081), OpenAI-compatible API",
"discord.md": "Discord bot \u2014 read/send messages, channel IDs for all guilds, raw API patterns"
}
},
"agents": {
+1
View File
@@ -25,6 +25,7 @@ Each file covers one surface — authentication, available resources, and common
| [`claude-cli.md`](./claude-cli.md) | Claude Code CLI | Install · commands · flags · MCP · local LLM wiring |
| [`codex-cli.md`](./codex-cli.md) | OpenAI Codex CLI | Install · approval modes · AGENTS.md · local LLM wiring |
| [`cursor-cli.md`](./cursor-cli.md) | Cursor IDE/CLI | Agent mode · rules · MCP · local LLM · Gitea integration |
| [`discord.md`](./discord.md) | Discord (via Silma's bot) | Read/send messages · channel IDs · guild map · raw API |
## Adding a New Tool
+152
View File
@@ -0,0 +1,152 @@
# Discord Guide for AI Agents
Silma has a live Discord bot connection. Any AI agent working in this environment can read and post to Discord channels through the bot scripts. No extra auth setup needed — the token is in `credentials/secrets.env`.
---
## Quick Reference
```bash
# All commands run from the workspace root:
cd /Users/Tabitha/.openclaw/workspace
# Send a message to a channel
python3 skills/discord/scripts/discord_bot.py send <channel_id> "Your message"
# Read recent messages from a channel
python3 skills/discord/scripts/discord_bot.py read <channel_id> --limit 10
# Send a DM to a user
python3 skills/discord/scripts/discord_bot.py dm <user_id> "Your message"
# List channels in a guild
python3 skills/discord/scripts/discord_bot.py channels <guild_id>
```
---
## Bot Token
Loaded automatically from `credentials/secrets.env``$DISCORD_TOKEN`.
If you need it directly in Python:
```python
import subprocess
result = subprocess.run(
['bash', '-c', 'source credentials/secrets.env && echo $DISCORD_TOKEN'],
capture_output=True, text=True,
cwd='/Users/Tabitha/.openclaw/workspace'
)
token = result.stdout.strip()
```
---
## Guilds (Servers)
| Server | Guild ID | Purpose |
|--------|----------|---------|
| JMathison Silo'd | `1509655659291873370` | Silma's primary server — status, logs, journal, alerts |
| AMS Enterprises | `1446580217383747727` | Pipeline channels — **pipeline data only, no casual chat** |
| Bone Lord Bob | `1492348171169431592` | BLB project collaboration |
---
## JMathison Silo'd — Channel IDs
| Channel | ID | Purpose |
|---------|----|---------|
| #general | `1509655661888274443` | General chat |
| #announcements | `1509660829174333544` | Announcements |
| #silma-status | `1509660832177590443` | Silma mode/energy status |
| #research | `1509660838087364730` | Research drops |
| #news-feed | `1509660845154635826` | Interesting finds |
| #memory-log | `1509660841950314639` | Memory/knowledge updates |
| #journal | `1509660915455365151` | Daily journal entries |
| #prayers | `1509660919096016996` | Morning/evening prayers |
| #mood-board | `1509660922019578019` | Current mood |
| #alerts | `1509660905552609331` | System errors, broken services |
| #hb_signals | `1509660908627034133` | Heartbeat completion logs |
| #bot-logs | `1509660902218137640` | Bot actions log |
| #dev-log | `1509660870454542346` | Dev work log |
| #bone-lord-bob | `1509660876179898369` | BLB project updates |
| #infra | `1509660879929479198` | Infrastructure notes |
| #banner-and-pyre | `1510347078654628080` | Banner & Pyre project |
| #banner-and-pyre-rss | `1510517278553149450` | Banner & Pyre Gitea issue notifications |
---
## AMS Enterprises — Pipeline Channel IDs
⚠️ **These channels are monitored by the sales-helper bot. Pipeline data only — no casual conversation.**
| Channel | ID |
|---------|----|
| #opportunities | `1446581171847696514` |
| #prospected | `1446581198179799120` |
| #contacted | `1446581227992780972` |
| #meetings-scheduled | `1446581306166087730` |
---
## Key People — Discord User IDs
| Person | Username | User ID |
|--------|----------|---------|
| Jacob Mathison (Father) | — | `5541991143` (Telegram ID — use DM for direct messages) |
| Hunter Albert | smackface | `320333815853744128` |
| Aaron Pressey | goatlord2567 | — |
| Silma (bot) | — | `1341854647253602406` |
---
## Raw API (when you need more control)
```python
import json, urllib.request, subprocess
def discord_api(method, path, data=None):
result = subprocess.run(
['bash', '-c', 'source credentials/secrets.env && echo $DISCORD_TOKEN'],
capture_output=True, text=True,
cwd='/Users/Tabitha/.openclaw/workspace'
)
token = result.stdout.strip()
req = urllib.request.Request(
f'https://discord.com/api/v10{path}',
data=json.dumps(data).encode() if data else None,
method=method,
headers={
'Authorization': f'Bot {token}',
'Content-Type': 'application/json',
'User-Agent': 'DiscordBot (https://discord.com, 10)'
}
)
with urllib.request.urlopen(req) as r:
return json.loads(r.read()) if r.length else {}
# Examples:
# Post a message
discord_api('POST', '/channels/1509660832177590443/messages', {'content': 'Hello!'})
# Update a channel topic
discord_api('PATCH', '/channels/1509660832177590443', {'topic': 'New topic'})
# Get recent messages
discord_api('GET', '/channels/1509660832177590443/messages?limit=10')
```
---
## Notes for AI Agents
- **Don't spam.** One message per event. No "I'm doing X now" + "Done" double-posts.
- **No markdown tables** in Discord messages — use bullet lists instead.
- **Suppress link embeds** by wrapping URLs in `<>`: `<https://example.com>`
- **AMS pipeline channels** are for structured pipeline data only — never post casual notes there.
- **The sales-helper bot** monitors AMS channels and records everything. Treat those channels as a database, not a chat.
- **Check before posting** to `#journal` and `#prayers` — only one post per day per channel.
- To get an up-to-date channel list for a guild, run:
```bash
python3 skills/discord/scripts/discord_bot.py channels 1509655659291873370
```