Skip to content

Switch songbird to DAVE-enabled fork for Discord E2EE voice support#7

Merged
foylaou merged 2 commits intomainfrom
feat/dave-e2ee-support
Mar 4, 2026
Merged

Switch songbird to DAVE-enabled fork for Discord E2EE voice support#7
foylaou merged 2 commits intomainfrom
feat/dave-e2ee-support

Conversation

@foylaou
Copy link
Owner

@foylaou foylaou commented Mar 4, 2026

Summary

  • Discord 自 2026/3/1 起強制所有非 Stage 語音頻道使用 DAVE (E2EE),不支援的 bot 會收到 close code 4017
  • Songbird 上游尚未合併 DAVE 支援,使用 beer-psi 的 fork(serenity-rs/songbird#291)搭配 davey crate
  • aoede 不需要任何程式碼修改,DAVE 加密對應用層完全透明
  • 已測試確認可以正常加入語音頻道並播放音樂

後續

  • 等 songbird PR #291 合併後,改回 crates.io 依賴

Test plan

  • cargo check 編譯通過
  • cargo build --release 建置成功
  • 實際測試加入 Discord 語音頻道正常
  • Spotify 串流播放正常

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated audio processing dependency to a specialized fork version for enhanced stability and compatibility.

…streams on Discord will require end-to-end encryption starting on March 2nd, 2026.
@coderabbitai
Copy link

coderabbitai bot commented Mar 4, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c497be48-b05a-43ad-883c-a5cf208e1d00

📥 Commits

Reviewing files that changed from the base of the PR and between 8c4b0d5 and 9c6f7df.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • Cargo.toml

📝 Walkthrough

Walkthrough

The songbird dependency was updated from the published crate version 0.5 to a git-based fork from the davey branch, maintaining the original feature set. This change redirects the dependency source from the crate registry to a custom repository fork.

Changes

Cohort / File(s) Summary
Dependency Source Migration
Cargo.toml
Updated songbird dependency from published crate version 0.5 to git fork (https://github.com/beerpsi-forks/songbird.git, branch davey) with preserved features (serenity, driver, gateway, rustls).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A fork in the dependency tree,
From the published crate to davey's spree,
Songbird now sings from a custom nest,
Features preserved, put to the test!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: switching the songbird dependency to a DAVE-enabled fork to support Discord's E2EE voice requirement.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/dave-e2ee-support

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

此拉取請求旨在為 Discord 語音頻道引入 DAVE (End-to-End Encryption) 支援,以應對 Discord 即將實施的強制性加密要求。透過將 songbird 依賴切換到一個支援 DAVE 的分叉版本,確保了服務的持續運作能力。這項變更對應用程式層是無感的,並且已經過測試驗證其功能正常。

Highlights

  • Discord DAVE (E2EE) 語音支援: Discord 將於 2026 年 3 月 1 日起強制所有非 Stage 語音頻道使用 DAVE (End-to-End Encryption),不支援的機器人將會收到 close code 4017。
  • 切換 Songbird 依賴: 由於 Songbird 上游尚未合併 DAVE 支援,本 PR 將 songbird 依賴切換至 beer-psi 的 DAVE-enabled fork (DAVE support serenity-rs/songbird#291),並搭配 davey crate。
  • 應用層透明: 此 DAVE 加密變更對 aoede 應用層完全透明,無需任何程式碼修改。
  • 功能驗證: 已測試確認可以正常加入 Discord 語音頻道並播放音樂。
  • 後續計畫: 待 Songbird 上游 PR #291 合併後,將會改回使用 crates.io 上的穩定依賴。

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • Cargo.lock
    • 新增了多個與 DAVE 支援相關的新依賴,包括 daveyopenmlshpke-rslibcrux 相關的加密函式庫,以及 curve25519-dalekp256scrypttls_codec 等。
    • 更新了 parking_lotredox_syscall 等現有套件的版本。
    • serenity-voice-model 的來源從 crates.io 變更為 Git 儲存庫。
  • Cargo.toml
    • 修改了 songbird 依賴的來源,從 crates.io 上的版本依賴變更為指向 https://github.com/beerpsi-forks/songbird.gitdavey 分支,以啟用 DAVE 支援。
Activity
  • 此拉取請求由 foylaou 建立,旨在為 Discord 語音支援引入 DAVE (E2EE)。
  • 拉取請求描述中包含了詳細的變更摘要、後續計畫和測試計畫。
  • 變更主要涉及 Cargo.tomlCargo.lock 檔案中的依賴項更新。
  • 測試計畫已確認編譯和建置成功,且能正常加入 Discord 語音頻道並播放 Spotify 串流。
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Owner Author

@foylaou foylaou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

這份 PR 為了支援 Discord 的 E2EE (DAVE) 語音加密,將 songbird 依賴切換到一個支援此功能的 fork。這項改動是必要的,能確保機器人未來能正常運作。

整體來看,變更集中在依賴管理檔案 (Cargo.tomlCargo.lock),沒有動到應用程式邏輯,這點很好。

我只提出了一項關於 Cargo.toml 中依賴覆寫方式的建議,旨在提高專案的長期可維護性。除此之外,沒有發現其他問題。

Note: Security Review has been skipped due to the limited scope of the PR.

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@foylaou foylaou self-assigned this Mar 4, 2026
@foylaou foylaou merged commit 8f792e3 into main Mar 4, 2026
1 check 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.

1 participant