From f89f308c525e9deebc6d2cf6416e27dfe1a299dc Mon Sep 17 00:00:00 2001 From: Dennis Kobert Date: Sun, 19 May 2019 16:03:38 +0200 Subject: Cleanup DiscoBot Project --- DiscoBot/Audio/AudioModule.cs | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) (limited to 'DiscoBot/Audio/AudioModule.cs') diff --git a/DiscoBot/Audio/AudioModule.cs b/DiscoBot/Audio/AudioModule.cs index f8834f3..add4bf0 100644 --- a/DiscoBot/Audio/AudioModule.cs +++ b/DiscoBot/Audio/AudioModule.cs @@ -1,33 +1,21 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Security.Cryptography; -using System.Threading.Tasks; - -using DiscoBot; -using DiscoBot.Audio; -using DiscoBot.Auxiliary; -using DiscoBot.Commands; - +using System.Threading.Tasks; using Discord; using Discord.Commands; namespace DiscoBot.Audio { - using DiscoBot.DSA_Game; - public class AudioModule : ModuleBase { // Scroll down further for the AudioService. // Like, way down - private readonly AudioService _service; + private readonly AudioService service; // Remember to add an instance of the AudioService // to your IServiceCollection when you initialize your bot public AudioModule(AudioService service) { - _service = service; - Dsa.Service = service; + this.service = service; + //Dsa.Service = service; } // You *MUST* mark these commands with 'RunMode.Async' @@ -35,7 +23,7 @@ namespace DiscoBot.Audio [Command("_join", RunMode = RunMode.Async)] public async Task JoinCmd() { - await _service.JoinAudio(Context.Guild, (Context.User as IVoiceState).VoiceChannel); + await service.JoinAudio(Context.Guild, (Context.User as IVoiceState).VoiceChannel); } // Remember to add preconditions to your commands, @@ -44,13 +32,13 @@ namespace DiscoBot.Audio [Command("_leave", RunMode = RunMode.Async)] public async Task LeaveCmd() { - await _service.LeaveAudio(Context.Guild); + await service.LeaveAudio(Context.Guild); } [Command("_play", RunMode = RunMode.Async)] public async Task PlayCmd([Remainder] string song) { - if (Dsa.GeneralContext == null) + /*if (Dsa.GeneralContext == null) { Dsa.GeneralContext = this.Context; } @@ -71,7 +59,7 @@ namespace DiscoBot.Audio await _service.SendAudioAsync(Context.Guild, Context.Channel, song); } - SoundEffects.Play(song); + SoundEffects.Play(song);*/ } } } \ No newline at end of file -- cgit v1.2.3-54-g00ecf