openclaw/extensions
Johnathon Selstad c624ff3098 feat(discord): Add bot presence/status updates with token usage tracking
Integrates presence updates directly into the Discord channel integration:

- Added presence config schema (channels.discord.presence):
  - enabled: Toggle presence updates
  - showTokenUsage: Show cumulative token count
  - format: Custom format string with placeholders ({tokens}, {model}, etc.)
  - activityType: Playing, Watching, Listening, Competing (NOT Custom - bots can't use it)
  - status: online, idle, dnd, invisible

- Created PresenceManager in src/discord/monitor/presence-manager.ts:
  - Tracks cumulative token usage per session
  - Formats status text with configurable placeholders
  - Interfaces with Carbon GatewayPlugin.updatePresence()

- Created presence registry (src/discord/presence-registry.ts):
  - Shared registry for presence managers across accounts
  - Exported via plugin-sdk for extension access

- Wired up message_sent hook in Discord extension:
  - Hook triggers after each reply is delivered
  - Updates bot presence with session token counts

Config example:
```json5
channels: {
  discord: {
    presence: {
      enabled: true,
      showTokenUsage: true,
      format: "📊 {tokens} tokens",
      activityType: "Watching",  // Shows: "Watching 📊 1,234 tokens"
      status: "online"
    }
  }
}
```

Note: Discord API limitation - bots cannot use Custom activity type (type 4).
Available types: Playing, Watching, Listening, Competing.
2026-01-26 14:31:47 -08:00
..
bluebubbles fix: coalesce BlueBubbles link previews (#1981) (thanks @tyler6204) 2026-01-26 14:12:22 -08:00
copilot-proxy chore: bump versions for 2026.1.25 2026-01-25 22:13:04 +00:00
diagnostics-otel chore: bump versions for 2026.1.25 2026-01-25 22:13:04 +00:00
discord feat(discord): Add bot presence/status updates with token usage tracking 2026-01-26 14:31:47 -08:00
google-antigravity-auth Auth: print copyable Google auth URL (#1787) 2026-01-25 21:13:36 -06:00
google-gemini-cli-auth chore: bump versions for 2026.1.25 2026-01-25 22:13:04 +00:00
googlechat chore: bump versions for 2026.1.25 2026-01-25 22:13:04 +00:00
imessage chore: bump versions for 2026.1.25 2026-01-25 22:13:04 +00:00
line chore: bump versions for 2026.1.25 2026-01-25 22:13:04 +00:00
llm-task chore: bump versions for 2026.1.25 2026-01-25 22:13:04 +00:00
lobster chore: bump versions for 2026.1.25 2026-01-25 22:13:04 +00:00
matrix chore: bump versions for 2026.1.25 2026-01-25 22:13:04 +00:00
mattermost chore: bump versions for 2026.1.25 2026-01-25 22:13:04 +00:00
memory-core chore: bump versions for 2026.1.25 2026-01-25 22:13:04 +00:00
memory-lancedb chore: bump versions for 2026.1.25 2026-01-25 22:13:04 +00:00
msteams chore: bump versions for 2026.1.25 2026-01-25 22:13:04 +00:00
nextcloud-talk chore: bump versions for 2026.1.25 2026-01-25 22:13:04 +00:00
nostr chore: bump versions for 2026.1.25 2026-01-25 22:13:04 +00:00
open-prose chore: bump versions for 2026.1.25 2026-01-25 22:13:04 +00:00
qwen-portal-auth fix: enforce plugin config schemas (#1272) (thanks @thewilloftheshadow) 2026-01-20 11:03:17 +00:00
signal chore: bump versions for 2026.1.25 2026-01-25 22:13:04 +00:00
slack chore: bump versions for 2026.1.25 2026-01-25 22:13:04 +00:00
telegram chore: bump versions for 2026.1.25 2026-01-25 22:13:04 +00:00
tlon Tlon: format reply IDs as @ud (#1837) 2026-01-25 22:30:18 -06:00
twitch feat: Twitch Plugin (#1612) 2026-01-26 13:48:10 -06:00
voice-call fix: secure twilio webhook verification 2026-01-26 16:18:37 +00:00
whatsapp chore: bump versions for 2026.1.25 2026-01-25 22:13:04 +00:00
zalo chore: bump versions for 2026.1.25 2026-01-25 22:13:04 +00:00
zalouser chore: bump versions for 2026.1.25 2026-01-25 22:13:04 +00:00