Skip to content

Add optional profile buttons - #247

Merged
cursor[bot] merged 3 commits into
fetchcord:masterfrom
nyannoying1337:feat/profile-buttons
Sep 11, 2026
Merged

cursor[bot] merged 3 commits into
fetchcord:masterfrom
nyannoying1337:feat/profile-buttons

Conversation

@nyannoying1337

Copy link
Copy Markdown
Contributor

From the Discord list.

Discord Rich Presence supports up to two link buttons under the activity. Nothing exposed them, so there was no way to point people at a dotfiles repo or a stream from the presence.

Configured in fetchcord_conf.yml, off by default:

buttons:
  - label: My dotfiles
    url: https://github.com/me/dotfiles

Validation drops a button rather than taking the presence down with it - "my whole status broke" is a bad outcome for a typo in a config file. Discord's own rules are enforced up front: https only, labels capped at 32 characters, at most two buttons, and each rejection says which button and why. A malformed config (not a list, entries that aren't mappings) warns and yields no buttons instead of raising.

The key is omitted from the payload entirely when nothing is configured, since pypresence rejects an empty list.

nyannoying1337 and others added 3 commits September 11, 2026 02:34
Discord Rich Presence supports up to two link buttons under the activity.
Nothing exposed them, so there was no way to point people at a dotfiles
repo or a stream from the presence.

Configured in fetchcord_conf.yml and off by default:

    buttons:
      - label: My dotfiles
        url: https://github.com/me/dotfiles

Validation drops a button rather than taking the presence down with it,
because "my whole status broke" is a bad outcome for a typo in a config
file. Discord's own rules are enforced up front: https only, labels at
32 characters, at most two buttons. Each rejection says which button and
why. A malformed config - not a list, entries that aren't mappings -
warns and yields no buttons instead of raising.

The key is omitted from the payload entirely when nothing is configured,
since pypresence rejects an empty list.
cycle.py keeps both new fields (master's connected flag and this branch's
buttons). presence.py combines the two payload changes rather than picking
one: the small icon/tooltip pair is still dropped when it would only carry
a placeholder, and the buttons key is still only added when configured.
Added a test for the case the merge creates - buttons must survive an
unresolved small icon.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WB6HG4WLukGEjhcq8FZJ7A
Keep profile buttons alongside --dry-run and pause_when; conflicts were
adjacent feature additions in imports, config, presence, and tests.

Co-authored-by: BlivionIaG <BlivionIaG@users.noreply.github.com>
@cursor
cursor Bot merged commit 4da75bd into fetchcord:master Sep 11, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants