Skip to content

New Plugin: Custom DM notification sounds#4221

Open
XliteChase wants to merge 6 commits into
Vendicated:mainfrom
XliteChase:Custom-notification-sounds
Open

New Plugin: Custom DM notification sounds#4221
XliteChase wants to merge 6 commits into
Vendicated:mainfrom
XliteChase:Custom-notification-sounds

Conversation

@XliteChase
Copy link
Copy Markdown

@XliteChase XliteChase commented May 14, 2026

Summary

Adds CustomDMNotificationSound, a plugin that lets users set custom DM notification sounds for specific users.

Features

  • Adds a user context menu entry to assign a custom DM sound
  • Supports multiple users, up to 10 configured sounds
  • Allows changing, previewing, and removing user-specific sounds
  • Stores selected audio files in Vencord settings as data URLs
  • Adds a 2 MB per-file limit to avoid oversized settings
  • Cleans up active audio playback and message cache when the plugin stops

Review Fixes Addressed

  • Added error handling for failed file reads
  • Added stop() cleanup
  • Added plugin README
  • Avoids storing proxied settings objects by cloning custom sound data before writes

Testing

  • pnpm exec eslint src/plugins/customDmNotificationSound/index.tsx src/utils/constants.ts
  • pnpm testTsc
  • pnpm generatePluginJson
image_2026-05-14_173844961 image_2026-05-14_174041168

Copy link
Copy Markdown

@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

This pull request introduces the CustomDMNotificationSound plugin, which allows users to assign custom audio files to specific direct message notifications. The implementation includes a settings manager, context menu options for users, and a patch to Discord's internal sound logic. Feedback from the review highlights the need to reduce the maximum file size limit to 512 KB to avoid performance issues with settings synchronization. Other suggestions include fixing a bug in the sound interception logic that could lead to redundant sounds during UI re-renders, addressing a race condition when updating settings, extending support to Group DMs, and ensuring legacy data is cleaned up after migration.

Comment thread src/plugins/customDmNotificationSound/index.tsx Outdated
Comment thread src/plugins/customDmNotificationSound/index.tsx
Comment thread src/plugins/customDmNotificationSound/index.tsx Outdated
Comment thread src/plugins/customDmNotificationSound/index.tsx
Comment thread src/plugins/customDmNotificationSound/README.md Outdated
XliteChase and others added 4 commits May 14, 2026 17:41
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@XliteChase XliteChase changed the title Custom DM notification sounds New Plugin: Custom DM notification sounds May 14, 2026
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