---
name: feedback_dm_wrapping_commands_to_mike
description: 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.
metadata:
  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.
