Skip to content

Add Discord sink #3

@YuyangXueEd

Description

@YuyangXueEd

Summary

Add a Discord delivery sink so users can receive their daily digest in a Discord channel via an Incoming Webhook.

Why

Discord is widely used by developer and research communities. It uses the same incoming webhook pattern as the existing Slack sink, making this a well-scoped first contribution.

What to implement

A new sink at sinks/discord/ that:

  • Sends the daily digest as one or more Discord messages using the Discord Incoming Webhook API
  • Formats content using Discord's markdown (bold, links, code blocks)
  • Reads the webhook URL from DISCORD_WEBHOOK_URL environment variable / GitHub Secret
  • Respects the max_papers, max_hn, max_github config options (same as Slack sink)

How to get started

  1. Copy sinks/_template/ to sinks/discord/
  2. Look at sinks/slack/ as a reference implementation — the Discord webhook API is very similar
  3. Add config under sinks: in config/sources.yaml:
    sinks:
      discord:
        enabled: false
        max_papers: 5
        max_hn: 3
        max_github: 3
  4. Register in sinks/__init__.py
  5. Add DISCORD_WEBHOOK_URL to .github/workflows/daily.yml env block (see how SLACK_WEBHOOK_URL is handled)
  6. Write a test in tests/ — see tests/test_slack_sink.py for the pattern
  7. Add a sinks/discord/README.md documenting setup

Acceptance criteria

  • sinks/discord/__init__.py with DiscordSink class
  • sinks/discord/README.md with setup instructions
  • Registered in sinks/__init__.py
  • Config block documented in config/sources.yaml (commented out, enabled: false)
  • DISCORD_WEBHOOK_URL wired into daily.yml
  • At least one test
  • pytest tests/ -q passes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions