From 256154e2ab4244e7267ffc21959a4ce65c982783 Mon Sep 17 00:00:00 2001 From: TrueDoctor Date: Sun, 3 Jun 2018 15:16:59 +0200 Subject: Basic code cleanup and removal of unnessesery libarys --- DiscoBot/Audio/Soundeffects.cs | 2 +- DiscoBot/Audio/Voice.cs | 4 ++-- DiscoBot/Commands/MiscCommands.cs | 12 ++---------- DiscoBot/DiscoBot.csproj | 20 ++------------------ DiscoBot/packages.config | 4 +--- 5 files changed, 8 insertions(+), 34 deletions(-) (limited to 'DiscoBot') diff --git a/DiscoBot/Audio/Soundeffects.cs b/DiscoBot/Audio/Soundeffects.cs index 9982947..7e5e918 100644 --- a/DiscoBot/Audio/Soundeffects.cs +++ b/DiscoBot/Audio/Soundeffects.cs @@ -67,7 +67,7 @@ if (url != string.Empty) { // await Dsa.Service.SendAudioAsync(url, vol); - await Voice.SendAsync(url, volume); + Voice.SendAsync(url, volume); return; } diff --git a/DiscoBot/Audio/Voice.cs b/DiscoBot/Audio/Voice.cs index f9fc7a3..84a221c 100644 --- a/DiscoBot/Audio/Voice.cs +++ b/DiscoBot/Audio/Voice.cs @@ -18,7 +18,7 @@ { public static IAudioClient Client { get; set; } - public static async Task SendAsync(string path, int volume = 256) + public static void SendAsync(string path, int volume = 256) { if (Client == null) { @@ -74,7 +74,7 @@ } [Command("volume")] - public async Task SetVolume(int volume) + public void SetVolume(int volume) { if (volume <= 100 && volume >= 0) { diff --git a/DiscoBot/Commands/MiscCommands.cs b/DiscoBot/Commands/MiscCommands.cs index 551022a..8c9417c 100644 --- a/DiscoBot/Commands/MiscCommands.cs +++ b/DiscoBot/Commands/MiscCommands.cs @@ -51,14 +51,6 @@ namespace DiscoBot.Commands return this.ReplyAsync(echo); } - [Command("spot"), Summary("Echos a message.")] - [Alias("spotify")] - public Task SpotiAsync([Remainder, Summary("The text to echo")] string echo) - { - var test = new Spotify.WebClient(); - return this.ReplyAsync(string.Join("\n", test.GetPlaylist(""))); - } - [Command("liebe"), Summary("Echos a message.")] [Alias("Liebe", "<3", "love")] public Task LoveAsync() @@ -190,7 +182,7 @@ namespace DiscoBot.Commands } if(Permissions.Check(this.Context, new []{"Admin", "Mod"})) - this.ReplyTimedAsync(sb.ToString(), TimeSpan.FromSeconds(90)); + await this.ReplyTimedAsync(sb.ToString(), TimeSpan.FromSeconds(90)); //await this.ReplyAsync($"{count} Duplikate gefunden"); @@ -267,7 +259,7 @@ namespace DiscoBot.Commands Antwort = Antwort + $"\nAuf unserem Server Kein Match gefunden: {quarry} \n```"; } - ReplyAsync(Antwort); + await ReplyAsync(Antwort); } } diff --git a/DiscoBot/DiscoBot.csproj b/DiscoBot/DiscoBot.csproj index 18a304e..044eb45 100644 --- a/DiscoBot/DiscoBot.csproj +++ b/DiscoBot/DiscoBot.csproj @@ -53,11 +53,8 @@ ..\packages\Discord.Net.WebSocket.1.0.2\lib\net45\Discord.Net.WebSocket.dll - - ..\packages\FSharp.Core.4.0.0.1\lib\net40\FSharp.Core.dll - - - ..\packages\HtmlAgilityPack.1.4.9.4\lib\Net45\HtmlAgilityPack.dll + + ..\packages\FSharp.Core.4.3.4\lib\net45\FSharp.Core.dll ..\packages\Microsoft.Extensions.DependencyInjection.2.0.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.dll @@ -71,12 +68,6 @@ ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll - - ..\packages\ScrapySharp.2.6.2\lib\net45\ScrapySharp.Core.dll - - - ..\packages\ScrapySharp.2.6.2\lib\net45\ScrapySharpAsync.dll - ..\packages\libsodium-net.0.10.0\lib\Net40\Sodium.dll @@ -162,7 +153,6 @@ - @@ -196,12 +186,6 @@ Settings.Designer.cs - - - {aef1f22a-7209-4939-b375-3f94b82f6f8a} - Spotify - - diff --git a/DiscoBot/packages.config b/DiscoBot/packages.config index 5c47ddc..583da28 100644 --- a/DiscoBot/packages.config +++ b/DiscoBot/packages.config @@ -8,8 +8,7 @@ - - + @@ -17,7 +16,6 @@ - -- cgit v1.2.3-70-g09d2