diff options
Diffstat (limited to 'DiscoBot/Auxiliary')
-rw-r--r-- | DiscoBot/Auxiliary/Soundeffects.cs | 54 | ||||
-rw-r--r-- | DiscoBot/Auxiliary/SpellCorrect.cs | 2 |
2 files changed, 56 insertions, 0 deletions
diff --git a/DiscoBot/Auxiliary/Soundeffects.cs b/DiscoBot/Auxiliary/Soundeffects.cs new file mode 100644 index 0000000..bc5bbb3 --- /dev/null +++ b/DiscoBot/Auxiliary/Soundeffects.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DiscoBot.Auxiliary +{ + using DiscoBot.Commands; + + public enum Sound + { + Ding, + Nooo, + Monterkill, + Finish, + Wrong + } + + public static class SoundEffects + { + public static Task Play(Sound s) + { + string url = string.Empty; + int vol = 256; + switch (s) + { + 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.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; + break; + } + + if (url != string.Empty) + { + return Voice.SendAsync(url, vol); + } + + return Dsa.GeneralContext.Channel.SendMessageAsync("Ton Existiert nicht"); + } + } +} diff --git a/DiscoBot/Auxiliary/SpellCorrect.cs b/DiscoBot/Auxiliary/SpellCorrect.cs index 48f6a57..4f4f7d0 100644 --- a/DiscoBot/Auxiliary/SpellCorrect.cs +++ b/DiscoBot/Auxiliary/SpellCorrect.cs @@ -6,6 +6,8 @@ public class SpellCorrect : StringComparer { + public const int ErrorThreshold = 94100; + public override int Compare(string x, string y) { if (string.IsNullOrEmpty(x)) |