summaryrefslogtreecommitdiff
path: root/DiscoBot/Auxiliary/Soundeffects.cs
blob: eb79177af643bd8c13dc6937a2486ffe4a0bb8c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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
    {
        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;
                    break;
            }

            if (url != string.Empty)
            {
                await Task.Run(() => Voice.SendAsync(url, vol));
                return;
            }

            await Dsa.GeneralContext.Channel.SendMessageAsync("Ton Existiert nicht");
        }
    }
}