Skip to content

Conversation

@ImDevinC
Copy link
Owner

@ImDevinC ImDevinC commented Jan 5, 2026

Summary

Migrates the plugin from a custom callback system to
StreamController's built-in EventHolder system for better
integration with the core framework.

Changes

  • Replace register_backend_callback with
    plugin_base.connect_to_event across all action classes
    (ChangeVoiceChannel, Deafen, Mute, TogglePTT, UserVolume)
  • Update callback signatures to use *args, **kwargs pattern
  • Remove custom callback management methods
    (register_callback, unregister_callback) from backend.py
  • Add EventHolder registration for core events
    (VOICE_CHANNEL_SELECT, VOICE_SETTINGS_UPDATE, GET_CHANNEL)
  • Implement trigger_event method in main.py for event
    dispatching through EventHolder system
  • Simplify backend by removing callbacks dict
  • Update version from 1.10.0 to 1.11.0

Impact

This maintains the same external functionality while:

  • Reducing code complexity by leveraging framework features
  • Improving maintainability through standardized event handling
  • Ensuring better compatibility with future updates

@ImDevinC ImDevinC force-pushed the refactor/migrate-to-event-system branch 4 times, most recently from 2142f0a to 03dfd64 Compare January 5, 2026 18:26
- Replace register_backend_callback with plugin_base.connect_to_event
- Update callback signatures to use *args, **kwargs pattern
- Remove custom callback management from backend.py
- Add EventHolder registration for voice and channel events
- Implement trigger_event method in main.py for event dispatching
- Simplify backend by removing callbacks dict
- Update version from 1.10.0 to 1.11.0
@ImDevinC ImDevinC force-pushed the refactor/migrate-to-event-system branch from 03dfd64 to ae2febb Compare January 5, 2026 18:31
@ImDevinC ImDevinC merged commit d27404a into main Jan 5, 2026
2 checks passed
@ImDevinC ImDevinC deleted the refactor/migrate-to-event-system branch January 5, 2026 18:32
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.

2 participants