Files
llm-tools/tools/discord.md
T

5.2 KiB

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

# 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:

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)

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:
python3 skills/discord/scripts/discord_bot.py channels 1509655659291873370