From 351067a5203307fc0c1a14ae2be84eae71246af9 Mon Sep 17 00:00:00 2001 From: TrueDoctor Date: Wed, 11 Apr 2018 14:19:57 +0200 Subject: Added possibillity for service based soundplaying --- DiscoBot/Auxiliary/Soundeffects.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'DiscoBot/Auxiliary') diff --git a/DiscoBot/Auxiliary/Soundeffects.cs b/DiscoBot/Auxiliary/Soundeffects.cs index 3c67fac..c959156 100644 --- a/DiscoBot/Auxiliary/Soundeffects.cs +++ b/DiscoBot/Auxiliary/Soundeffects.cs @@ -6,6 +6,9 @@ using System.Threading.Tasks; namespace DiscoBot.Auxiliary { + using System.Runtime.CompilerServices; + using System.Threading; + using DiscoBot.Commands; public enum Sound @@ -53,11 +56,11 @@ namespace DiscoBot.Auxiliary if (url != string.Empty) { - Task.Run(() => Voice.SendAsync(url, vol)); - return; + // await Dsa.Service.SendAudioAsync(url, vol); + await Voice.SendAsync(url, vol); } - await Dsa.GeneralContext.Channel.SendMessageAsync("Ton Existiert nicht"); + throw new Exception("Ton Existiert nicht"); } } } -- cgit v1.2.3-54-g00ecf