Files
claudetools/.claude/memory/feedback_dm_wrapping_commands_to_mike.md
Mike Swanson 6e5a389539 sync: auto-sync from GURU-5070 at 2026-06-13 12:10:56
Author: Mike Swanson
Machine: GURU-5070
Timestamp: 2026-06-13 12:10:56
2026-06-13 15:49:30 -07:00

1.8 KiB

name, description, metadata
name description metadata
feedback_dm_wrapping_commands_to_mike When a command/snippet you want Mike to run is long enough to wrap in the terminal, DM it to him in Discord (code block copies cleanly) instead of only putting it in chat.
type
feedback

Mike (2026-06-13): "For any command that wraps (like this one) DM me in discord, the line breaks suck." Terminal line-wrapping mangles long one-liners when he copies them.

How to apply: When you produce a command/code block for Mike to run that would wrap in the terminal (long one-liners, multi-flag commands), send it to him via Discord DM as a fenced code block (Discord copies the whole line cleanly regardless of visual wrap), and just reference it in chat ("DM'd you the command"). Short, non-wrapping commands can stay inline.

Mechanics (verified working 2026-06-13):

  • Bot token: vault projects/discord-bot/bot-token.sops.yaml field credentials.bot_token.
  • Mike's Discord user id: 264814939619721216 (Howard: 624667664501178379).
  • MUST set a User-Agent header like DiscordBot (https://azcomputerguru.com, 1.0) -- Discord's API is behind Cloudflare, which returns 403 error 1010 for the default urllib/curl UA. This is the #1 gotcha; both DM-open and message-send fail without it.
  • Open a DM channel: POST https://discord.com/api/v10/users/@me/channels {"recipient_id":<uid>} -> returns channel id; then POST /channels/<id>/messages {"content": "..."}.
  • Reusable helper written this session: .claude/tmp/discord-dm.py (reads body from a file or stdin; BOT_TOKEN from env). The bot CAN initiate DMs to Mike (mutual guild 624663750603046913); the earlier 403 was the missing UA, not a privacy block.

Related: reference_resource_map (Discord bot), the discord-bot project.