From e5e0c1c5c9fb6afd68ebe9dc075af23f46f11e25 Mon Sep 17 00:00:00 2001 From: TrueDoctor Date: Wed, 11 Apr 2018 14:41:01 +0200 Subject: General Cleanup and retructuring --- DiscoBot/Audio/Soundeffects.cs | 60 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 DiscoBot/Audio/Soundeffects.cs (limited to 'DiscoBot/Audio/Soundeffects.cs') diff --git a/DiscoBot/Audio/Soundeffects.cs b/DiscoBot/Audio/Soundeffects.cs new file mode 100644 index 0000000..555a79c --- /dev/null +++ b/DiscoBot/Audio/Soundeffects.cs @@ -0,0 +1,60 @@ +namespace DiscoBot.Audio +{ + using System; + using System.Threading.Tasks; + + using DiscoBot.Commands; + + public enum Sound + { + Bell, + Ding, + Nooo, + Monterkill, + Finish, + Wrong, + Magic + } + + public static class SoundEffects + { + public static async Task Play(Sound s) + { + string url = string.Empty; + int vol = 256; + switch (s) + { + case Sound.Bell: + case Sound.Ding: + url = "https://www.myinstants.com/media/sounds/boxing-bell.mp3"; + break; + case Sound.Finish: + url = "https://www.myinstants.com/media/sounds/finishhim.swf.mp3"; + break; + case Sound.Magic: + url = "https://www.myinstants.com/media/sounds/dream-harp-sound-effect.mp3"; + break; + case Sound.Monterkill: + url = "https://www.myinstants.com/media/sounds/announcer_kill_monster_01.mp3"; + break; + case Sound.Nooo: + url = "https://www.myinstants.com/media/sounds/nooo.swf.mp3"; + break; + case Sound.Wrong: + // url = "https://www.myinstants.com/media/sounds/stupid_dum_03.mp3"; + // vol = 10; + url = "https://www.myinstants.com/media/sounds/wrong-answer-sound-effect.mp3"; + vol = 50; + break; + } + + if (url != string.Empty) + { + // await Dsa.Service.SendAudioAsync(url, vol); + await Voice.SendAsync(url, vol); + } + + throw new Exception("Ton Existiert nicht"); + } + } +} -- cgit v1.2.3-70-g09d2