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.sln | 9 --------- DiscoBot/Audio/Soundeffects.cs | 2 +- DiscoBot/Audio/Voice.cs | 4 ++-- DiscoBot/Commands/MiscCommands.cs | 12 ++---------- DiscoBot/DiscoBot.csproj | 20 ++------------------ DiscoBot/packages.config | 4 +--- 6 files changed, 8 insertions(+), 43 deletions(-) diff --git a/DiscoBot.sln b/DiscoBot.sln index b2f0851..0dc4781 100644 --- a/DiscoBot.sln +++ b/DiscoBot.sln @@ -10,8 +10,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiscoBot", "DiscoBot\DiscoBot.csproj", "{1186AF1C-BC46-4B3D-BEE0-CE478B8AEAC7}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spotify", "..\Spotify\Spotify.csproj", "{AEF1F22A-7209-4939-B375-3F94B82F6F8A}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -22,17 +20,10 @@ Global {1186AF1C-BC46-4B3D-BEE0-CE478B8AEAC7}.Debug|Any CPU.Build.0 = Debug|Any CPU {1186AF1C-BC46-4B3D-BEE0-CE478B8AEAC7}.Release|Any CPU.ActiveCfg = Release|Any CPU {1186AF1C-BC46-4B3D-BEE0-CE478B8AEAC7}.Release|Any CPU.Build.0 = Release|Any CPU - {AEF1F22A-7209-4939-B375-3F94B82F6F8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AEF1F22A-7209-4939-B375-3F94B82F6F8A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AEF1F22A-7209-4939-B375-3F94B82F6F8A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AEF1F22A-7209-4939-B375-3F94B82F6F8A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {AEF1F22A-7209-4939-B375-3F94B82F6F8A} = {A6857735-6707-4A33-A7F8-3A06E354D7F3} - EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {CADA01A3-B80B-4979-8397-7CB5B825CE34} EndGlobalSection 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.3.1