feat: add test sound command and enable notifications by default

This commit is contained in:
HueByte
2026-02-19 22:42:20 +01:00
parent 107152298e
commit f20ce3d50f
8 changed files with 89 additions and 188 deletions
@@ -25,13 +25,29 @@ public class NotificationSoundService
if (!_config.Enabled || _resolvedSoundPath is null)
return;
await PlayInternal();
}
/// <summary>
/// Plays the notification sound regardless of the Enabled setting (for /test-sound).
/// </summary>
public async Task PlayTestAsync()
{
if (_resolvedSoundPath is null)
return;
await PlayInternal();
}
private async Task PlayInternal()
{
try
{
if (_player.Playing)
await _player.Stop();
await _player.SetVolume(_config.Volume);
await _player.Play(_resolvedSoundPath);
await _player.Play(_resolvedSoundPath!);
}
catch (Exception ex)
{