private Task OnDiscordMessage(MessageCreateEventArgs e) { _ = Task.Run(async() => { try { await Task.Delay(1000); if (NotificationUtils.WillShowToast(e.Message)) { _toastManager?.HandleMessage(e.Message); _badgeManager?.Update(); if (_tileManager != null) { await _tileManager.HandleMessageAsync(e.Message); } } if (_secondaryTileManager != null) { await _secondaryTileManager.HandleMessageAsync(e.Message); } } catch (Exception) { // TODO: log } }); return(Task.CompletedTask); }
private async Task OnDiscordMessage(MessageCreateEventArgs e) { try { if (NotificationUtils.WillShowToast(e.Message)) { _toastManager?.HandleMessage(e.Message); _badgeManager?.Update(); if (_tileManager != null) { await _tileManager.HandleMessageAsync(e.Message); } } if (_secondaryTileManager != null) { await _secondaryTileManager.HandleMessageAsync(e.Message); } } catch (Exception) { // TODO: log } }