summaryrefslogtreecommitdiff
path: root/DiscoBot/Auxiliary
diff options
context:
space:
mode:
authorTrueDoctor <d-kobert@web.de>2018-04-11 14:19:57 +0200
committerTrueDoctor <d-kobert@web.de>2018-04-11 14:19:57 +0200
commit351067a5203307fc0c1a14ae2be84eae71246af9 (patch)
treea17b63d94b41c87215a03fd2a19edab9f4d53c30 /DiscoBot/Auxiliary
parentaa236f67bf1829e2a7c6e9a5f82d109b39147b11 (diff)
Added possibillity for service based soundplaying
Diffstat (limited to 'DiscoBot/Auxiliary')
-rw-r--r--DiscoBot/Auxiliary/Soundeffects.cs9
1 files changed, 6 insertions, 3 deletions
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");
}
}
}