diff options
Diffstat (limited to 'DiscoBot')
-rw-r--r-- | DiscoBot/App.config | 4 | ||||
-rw-r--r-- | DiscoBot/Audio/AudioModule.cs | 65 | ||||
-rw-r--r-- | DiscoBot/Audio/AudioService.cs | 95 | ||||
-rw-r--r-- | DiscoBot/Audio/Sound.cs | 18 | ||||
-rw-r--r-- | DiscoBot/Audio/Voice.cs | 94 | ||||
-rw-r--r-- | DiscoBot/Commands/FileHandler.cs | 2 | ||||
-rw-r--r-- | DiscoBot/Commands/MiscCommands.cs | 2 | ||||
-rw-r--r-- | DiscoBot/DiscoBot.csproj | 71 | ||||
-rw-r--r-- | DiscoBot/Program.cs | 4 | ||||
-rw-r--r-- | DiscoBot/Properties/Settings.Designer.cs | 2 | ||||
-rw-r--r-- | DiscoBot/Token | 1 | ||||
-rw-r--r-- | DiscoBot/packages.config | 50 |
12 files changed, 71 insertions, 337 deletions
diff --git a/DiscoBot/App.config b/DiscoBot/App.config index e99cd82..c862b4e 100644 --- a/DiscoBot/App.config +++ b/DiscoBot/App.config @@ -6,7 +6,7 @@ </sectionGroup> </configSections> <startup> - <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /> + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /> </startup> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> @@ -28,7 +28,7 @@ </dependentAssembly> <dependentAssembly> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" /> + <bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" /> </dependentAssembly> </assemblyBinding> </runtime> diff --git a/DiscoBot/Audio/AudioModule.cs b/DiscoBot/Audio/AudioModule.cs deleted file mode 100644 index add4bf0..0000000 --- a/DiscoBot/Audio/AudioModule.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System.Threading.Tasks; -using Discord; -using Discord.Commands; - -namespace DiscoBot.Audio -{ - public class AudioModule : ModuleBase - { - // Scroll down further for the AudioService. - // Like, way down - private readonly AudioService service; - - // Remember to add an instance of the AudioService - // to your IServiceCollection when you initialize your bot - public AudioModule(AudioService service) - { - this.service = service; - //Dsa.Service = service; - } - - // You *MUST* mark these commands with 'RunMode.Async' - // otherwise the bot will not respond until the Task times out. - [Command("_join", RunMode = RunMode.Async)] - public async Task JoinCmd() - { - await service.JoinAudio(Context.Guild, (Context.User as IVoiceState).VoiceChannel); - } - - // Remember to add preconditions to your commands, - // this is merely the minimal amount necessary. - // Adding more commands of your own is also encouraged. - [Command("_leave", RunMode = RunMode.Async)] - public async Task LeaveCmd() - { - await service.LeaveAudio(Context.Guild); - } - - [Command("_play", RunMode = RunMode.Async)] - public async Task PlayCmd([Remainder] string song) - { - /*if (Dsa.GeneralContext == null) - { - Dsa.GeneralContext = this.Context; - } - - var sounds = Enum.GetValues(typeof(Sound)); - var soundList = new List<Sound>(); - foreach (var sound in sounds) - { - soundList.Add((Sound)sound); - } - - var sc = new SpellCorrect(); - - var tSound = soundList.OrderBy(x => sc.Compare(song, x.ToString())).First(); - - if (sc.Compare(song, tSound.ToString()) > SpellCorrect.ErrorThreshold) - { - await _service.SendAudioAsync(Context.Guild, Context.Channel, song); - } - - SoundEffects.Play(song);*/ - } - } -}
\ No newline at end of file diff --git a/DiscoBot/Audio/AudioService.cs b/DiscoBot/Audio/AudioService.cs deleted file mode 100644 index a198eb2..0000000 --- a/DiscoBot/Audio/AudioService.cs +++ /dev/null @@ -1,95 +0,0 @@ -using System; -using System.Collections.Concurrent; -using System.Diagnostics; -using System.IO; -using System.Threading.Tasks; -using Discord; -using Discord.Audio; - -namespace DiscoBot.Audio -{ - public class AudioService - { - private readonly ConcurrentDictionary<ulong, IAudioClient> connectedChannels = - new ConcurrentDictionary<ulong, IAudioClient>(); - - public async Task JoinAudio(IGuild guild, IVoiceChannel target) - { - if (connectedChannels.TryGetValue(guild.Id, out var client)) return; - - if (target.Guild.Id != guild.Id) return; - - var audioClient = await target.ConnectAsync(); - - if (connectedChannels.TryAdd(guild.Id, audioClient)) - { - // If you add a method to log happenings from this service, - // you can uncomment these commented lines to make use of that. - //await Log(LogSeverity.Info, $"Connected to voice on {guild.Name}."); - } - } - - public async Task LeaveAudio(IGuild guild) - { - if (connectedChannels.TryRemove(guild.Id, out var client)) - await client.StopAsync(); - //await Log(LogSeverity.Info, $"Disconnected from voice on {guild.Name}."); - } - - public async Task SendAudioAsync(IGuild guild, IMessageChannel channel, string path) - { - // Your task: Get a full path to the file if the value of 'path' is only a filename. - if (!File.Exists(path) && false) - { - await channel.SendMessageAsync("File does not exist."); - return; - } - - if (connectedChannels.TryGetValue(guild.Id, out var client)) - //await Log(LogSeverity.Debug, $"Starting playback of {path} in {guild.Name}"); - using (var ffmpeg = CreateStream(path)) - using (var stream = client.CreatePCMStream(AudioApplication.Music)) - { - try - { - await ffmpeg.StandardOutput.BaseStream.CopyToAsync(stream); - } - finally - { - await stream.FlushAsync(); - } - } - } - - public async Task SendAudioAsync(string path, int volume) - { - // Your task: Get a full path to the file if the value of 'path' is only a filename. - if (!File.Exists(path) && false) - //await channel.SendMessageAsync("File does not exist."); - return; - - throw new NotImplementedException("get channel data from server"); - /*if (this.connectedChannels.TryGetValue()) - { - //await Log(LogSeverity.Debug, $"Starting playback of {path} in {guild.Name}"); - using (var ffmpeg = this.CreateStream(path)) - using (var stream = client.CreatePCMStream(AudioApplication.Voice)) - { - try { await ffmpeg.StandardOutput.BaseStream.CopyToAsync(stream); } - finally { await stream.FlushAsync(); } - } - }*/ - } - - private static Process CreateStream(string path) - { - return Process.Start(new ProcessStartInfo - { - FileName = "ffmpeg.exe", - Arguments = $"-hide_banner -loglevel panic -i \"{path}\" -ac 2 -f s16le -ar 48000 pipe:1", - UseShellExecute = false, - RedirectStandardOutput = true - }); - } - } -}
\ No newline at end of file diff --git a/DiscoBot/Audio/Sound.cs b/DiscoBot/Audio/Sound.cs deleted file mode 100644 index 85023c8..0000000 --- a/DiscoBot/Audio/Sound.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace DiscoBot.Audio -{ - public class Sound - { - public Sound(string name, string url, int volume) - { - Name = name; - Url = url; - Volume = volume; - } - - public string Name { get; } - - public string Url { get; } - - public int Volume { get; } - } -}
\ No newline at end of file diff --git a/DiscoBot/Audio/Voice.cs b/DiscoBot/Audio/Voice.cs deleted file mode 100644 index c2a3097..0000000 --- a/DiscoBot/Audio/Voice.cs +++ /dev/null @@ -1,94 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Threading.Tasks; -using DiscoBot.Auxiliary; -using Discord; -using Discord.Audio; -using Discord.Commands; - -namespace DiscoBot.Audio -{ - public class Voice : ModuleBase - { - public static IAudioClient Client { get; set; } - - public static void Send(string path, int volume = 256) - { - if (Client == null) throw new NullReferenceException("Bot befindet sich nicht in einem Sprachchannel"); - - // Create FFmpeg using the previous example - var ffmpeg = CreateStream(path, volume); - var output = ffmpeg.StandardOutput.BaseStream; - var barInvoker = new BackgroundWorker(); - barInvoker.DoWork += delegate - { - var discord = Client.CreatePCMStream(AudioApplication.Music); - output.CopyToAsync(discord); - - discord.FlushAsync(); - }; - - barInvoker.RunWorkerAsync(); - } - - [Command("join", RunMode = RunMode.Async)] - public async Task JoinChannelAsync(IVoiceChannel channel = null) - { - var msg = Context.Message; - - // Get the audio channel - channel = channel ?? (msg.Author as IGuildUser)?.VoiceChannel; - if (channel == null) - { - await msg.Channel.SendMessageAsync( - "User must be in a voice channel, or a voice channel must be passed as an argument."); - return; - } - - // For the next step with transmitting audio, you would want to pass this Audio Client in to a service. - var audioClient = await channel.ConnectAsync(); - Client = audioClient; - } - - [Command("leave", RunMode = RunMode.Async)] - public async Task LeaveChannelAsync(IVoiceChannel channel = null) - { -// Permissions.Test(this.Context, "Meister"); - - if (Client != null) - { - await Client.StopAsync(); - Client = null; - } - } - - - [Command("play", RunMode = RunMode.Async)] - public async Task PlayAudioAsync(string path) - { - if (Client == null) await Context.Channel.SendMessageAsync("Erst Joinen!"); - - //SoundEffects.Play(path); - - var sounds = Enum.GetValues(typeof(Sound)); - var soundList = new List<Sound>(); - foreach (var sound in sounds) soundList.Add((Sound) sound); - - var sc = new SpellCorrect(); - } - - private static Process CreateStream(string path, int vol = 256) - { - var ffmpeg = new ProcessStartInfo - { - FileName = "ffmpeg", - Arguments = $"-i {path} -ac 2 -f s16le -ar 48000 -ab 620000 -vol {vol} pipe:1", - UseShellExecute = false, - RedirectStandardOutput = true - }; - return Process.Start(ffmpeg); - } - } -}
\ No newline at end of file diff --git a/DiscoBot/Commands/FileHandler.cs b/DiscoBot/Commands/FileHandler.cs index 17928c8..4f8a785 100644 --- a/DiscoBot/Commands/FileHandler.cs +++ b/DiscoBot/Commands/FileHandler.cs @@ -8,7 +8,7 @@ namespace DiscoBot.Commands public class FileHandler : ModuleBase { //[Command("send"), Summary("fügt Helden hinzu")] - public async Task AddChar() + public void AddChar() { var msg = Context.Message; if (msg.Attachments == null) throw new ArgumentException("Es wurde keine Datei angehängt"); diff --git a/DiscoBot/Commands/MiscCommands.cs b/DiscoBot/Commands/MiscCommands.cs index 2bc2fad..738796c 100644 --- a/DiscoBot/Commands/MiscCommands.cs +++ b/DiscoBot/Commands/MiscCommands.cs @@ -124,7 +124,7 @@ namespace DiscoBot.Commands [Command("clear")] [Summary("Cleans up messages.")] - public async Task DeleteAsync(int count) + public void DeleteAsync(int count) { var messagesAsync = Context.Channel.GetMessagesAsync(count); if (messagesAsync != null) diff --git a/DiscoBot/DiscoBot.csproj b/DiscoBot/DiscoBot.csproj index 28f81a8..09f4cfd 100644 --- a/DiscoBot/DiscoBot.csproj +++ b/DiscoBot/DiscoBot.csproj @@ -8,7 +8,7 @@ <OutputType>Exe</OutputType> <RootNamespace>DiscoBot</RootNamespace> <AssemblyName>DiscoBot</AssemblyName> - <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> + <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <TargetFrameworkProfile /> @@ -35,43 +35,44 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> - <Reference Include="Discord.Net.Commands, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL"> - <HintPath>..\packages\Discord.Net.Commands.2.0.0-beta\lib\netstandard1.1\Discord.Net.Commands.dll</HintPath> + <Reference Include="Discord.Net.Commands, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL"> + <HintPath>..\packages\Discord.Net.Commands.2.1.0\lib\net46\Discord.Net.Commands.dll</HintPath> </Reference> - <Reference Include="Discord.Net.Core, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL"> - <HintPath>..\packages\Discord.Net.Core.2.0.0-beta\lib\net45\Discord.Net.Core.dll</HintPath> + <Reference Include="Discord.Net.Core, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL"> + <HintPath>..\packages\Discord.Net.Core.2.1.0\lib\net46\Discord.Net.Core.dll</HintPath> </Reference> - <Reference Include="Discord.Net.Rest, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL"> - <HintPath>..\packages\Discord.Net.Rest.2.0.0-beta\lib\net45\Discord.Net.Rest.dll</HintPath> + <Reference Include="Discord.Net.Rest, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL"> + <HintPath>..\packages\Discord.Net.Rest.2.1.0\lib\net46\Discord.Net.Rest.dll</HintPath> </Reference> <Reference Include="Discord.Net.Rpc, Version=1.0.2.0, Culture=neutral, processorArchitecture=MSIL"> <HintPath>..\packages\Discord.Net.Rpc.1.0.2\lib\net45\Discord.Net.Rpc.dll</HintPath> </Reference> - <Reference Include="Discord.Net.Webhook, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL"> - <HintPath>..\packages\Discord.Net.Webhook.2.0.0-beta\lib\netstandard1.1\Discord.Net.Webhook.dll</HintPath> + <Reference Include="Discord.Net.Webhook, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL"> + <HintPath>..\packages\Discord.Net.Webhook.2.1.0\lib\netstandard1.3\Discord.Net.Webhook.dll</HintPath> </Reference> - <Reference Include="Discord.Net.WebSocket, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL"> - <HintPath>..\packages\Discord.Net.WebSocket.2.0.0-beta\lib\net45\Discord.Net.WebSocket.dll</HintPath> + <Reference Include="Discord.Net.WebSocket, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL"> + <HintPath>..\packages\Discord.Net.WebSocket.2.1.0\lib\net46\Discord.Net.WebSocket.dll</HintPath> </Reference> - <Reference Include="FSharp.Core, Version=4.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> - <HintPath>..\packages\FSharp.Core.4.5.2\lib\net45\FSharp.Core.dll</HintPath> + <Reference Include="FSharp.Core, Version=4.6.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\FSharp.Core.4.6.2\lib\net45\FSharp.Core.dll</HintPath> </Reference> <Reference Include="Microsoft.Extensions.DependencyInjection, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> - <HintPath>..\packages\Microsoft.Extensions.DependencyInjection.2.2.0-preview2-35157\lib\net461\Microsoft.Extensions.DependencyInjection.dll</HintPath> + <HintPath>..\packages\Microsoft.Extensions.DependencyInjection.2.2.0\lib\net461\Microsoft.Extensions.DependencyInjection.dll</HintPath> </Reference> <Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> - <HintPath>..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.2.0-preview2-35157\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath> + <HintPath>..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath> </Reference> - <Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> - <HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath> + <Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> + <HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath> </Reference> <Reference Include="System" /> <Reference Include="System.Collections.Immutable, Version=1.2.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <HintPath>..\packages\System.Collections.Immutable.1.5.0\lib\netstandard2.0\System.Collections.Immutable.dll</HintPath> </Reference> + <Reference Include="System.ComponentModel.Composition" /> <Reference Include="System.Core" /> - <Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> - <HintPath>..\packages\System.Diagnostics.DiagnosticSource.4.5.0\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath> + <Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.3.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Diagnostics.DiagnosticSource.4.5.1\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath> </Reference> <Reference Include="System.Interactive.Async, Version=3.2.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL"> <HintPath>..\packages\System.Interactive.Async.3.2.0\lib\net46\System.Interactive.Async.dll</HintPath> @@ -79,31 +80,43 @@ <Reference Include="System.IO.Compression, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> <HintPath>..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll</HintPath> </Reference> - <Reference Include="System.Net.Http, Version=4.1.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> - <HintPath>..\packages\System.Net.Http.4.3.3\lib\net46\System.Net.Http.dll</HintPath> + <Reference Include="System.Net.Http, Version=4.1.1.3, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll</HintPath> + <Private>True</Private> <Private>True</Private> </Reference> <Reference Include="System.Net.Sockets, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <HintPath>..\packages\System.Net.Sockets.4.3.0\lib\net46\System.Net.Sockets.dll</HintPath> </Reference> + <Reference Include="System.Runtime, Version=4.1.1.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Runtime.4.3.1\lib\net462\System.Runtime.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> + <Reference Include="System.Runtime.Extensions, Version=4.1.1.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Runtime.Extensions.4.3.1\lib\net462\System.Runtime.Extensions.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> <Reference Include="System.Security.Cryptography.Algorithms, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net461\System.Security.Cryptography.Algorithms.dll</HintPath> <Private>True</Private> </Reference> + <Reference Include="System.Text.RegularExpressions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Text.RegularExpressions.4.3.1\lib\net463\System.Text.RegularExpressions.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> - <Compile Include="Audio\AudioModule.cs" /> - <Compile Include="Audio\AudioService.cs" /> - <Compile Include="Audio\Sound.cs" /> <Compile Include="Auxiliary\CommandExtension.cs" /> <Compile Include="Auxiliary\Dice.cs" /> <Compile Include="Auxiliary\Permissions.cs" /> <Compile Include="Commands\MiscCommands.cs" /> <Compile Include="Auxiliary\SpellCorrect.cs" /> <Compile Include="Commands\FileHandler.cs" /> - <Compile Include="Audio\Voice.cs" /> <Compile Include="Auxiliary\RandomMisc.cs" /> <Compile Include="Program.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> @@ -123,13 +136,7 @@ </None> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\DSALib\DSALib.csproj"> - <Project>{388dd4ed-29c4-4127-ac8f-34dd3fe9f9b0}</Project> - <Name>DSALib</Name> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <Folder Include="ToRework" /> + <Folder Include="ToRework\" /> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="..\packages\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets" Condition="Exists('..\packages\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets')" /> diff --git a/DiscoBot/Program.cs b/DiscoBot/Program.cs index 6ddac5d..4314a8d 100644 --- a/DiscoBot/Program.cs +++ b/DiscoBot/Program.cs @@ -4,7 +4,6 @@ using System.Linq; using System.Net; using System.Reflection; using System.Threading.Tasks; -using DiscoBot.Audio; using Discord; using Discord.Commands; using Discord.WebSocket; @@ -15,7 +14,7 @@ namespace DiscoBot { private DiscordSocketClient client; private CommandService commands; - private IServiceProvider services; + private IServiceProvider services = null; public static void Main(string[] args) { @@ -109,7 +108,6 @@ namespace DiscoBot private static void OnProcessExit(object sender, EventArgs e) { Console.WriteLine("I'm out of here"); - Voice.Client.StopAsync(); } } }
\ No newline at end of file diff --git a/DiscoBot/Properties/Settings.Designer.cs b/DiscoBot/Properties/Settings.Designer.cs index 9813b8a..f80dfa5 100644 --- a/DiscoBot/Properties/Settings.Designer.cs +++ b/DiscoBot/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace DiscoBot.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.6.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.0.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/DiscoBot/Token b/DiscoBot/Token new file mode 100644 index 0000000..4b78e50 --- /dev/null +++ b/DiscoBot/Token @@ -0,0 +1 @@ +Mjk0NTU0MDU4Nzg4NzAwMTYx.DgAvuw.amZ0Ep7-FKjToTf_wnY3h5Ep4Ow
\ No newline at end of file diff --git a/DiscoBot/packages.config b/DiscoBot/packages.config index 4aa29aa..75a1f83 100644 --- a/DiscoBot/packages.config +++ b/DiscoBot/packages.config @@ -1,60 +1,60 @@ <?xml version="1.0" encoding="utf-8"?> <packages> - <package id="Discord.Net" version="2.0.0-beta" targetFramework="net461" /> - <package id="Discord.Net.Commands" version="2.0.0-beta" targetFramework="net461" /> - <package id="Discord.Net.Core" version="2.0.0-beta" targetFramework="net461" /> - <package id="Discord.Net.Rest" version="2.0.0-beta" targetFramework="net461" /> + <package id="Discord.Net" version="2.1.0" targetFramework="net472" /> + <package id="Discord.Net.Commands" version="2.1.0" targetFramework="net472" /> + <package id="Discord.Net.Core" version="2.1.0" targetFramework="net472" /> + <package id="Discord.Net.Rest" version="2.1.0" targetFramework="net472" /> <package id="Discord.Net.Rpc" version="1.0.2" targetFramework="net461" /> - <package id="Discord.Net.Webhook" version="2.0.0-beta" targetFramework="net461" /> - <package id="Discord.Net.WebSocket" version="2.0.0-beta" targetFramework="net461" /> - <package id="FSharp.Core" version="4.5.2" targetFramework="net461" /> - <package id="Microsoft.Extensions.DependencyInjection" version="2.2.0-preview2-35157" targetFramework="net461" /> - <package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="2.2.0-preview2-35157" targetFramework="net461" /> - <package id="Microsoft.NETCore.Platforms" version="2.2.0-preview2-26905-02" targetFramework="net461" /> + <package id="Discord.Net.Webhook" version="2.1.0" targetFramework="net472" /> + <package id="Discord.Net.WebSocket" version="2.1.0" targetFramework="net472" /> + <package id="FSharp.Core" version="4.6.2" targetFramework="net472" /> + <package id="Microsoft.Extensions.DependencyInjection" version="2.2.0" targetFramework="net472" /> + <package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="2.2.0" targetFramework="net472" /> + <package id="Microsoft.NETCore.Platforms" version="2.2.1" targetFramework="net472" /> <package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="net461" /> <package id="NETStandard.Library" version="2.0.3" targetFramework="net461" /> - <package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" /> - <package id="System.AppContext" version="4.3.0" targetFramework="net461" /> + <package id="Newtonsoft.Json" version="12.0.2" targetFramework="net472" /> + <package id="System.AppContext" version="4.3.0" targetFramework="net461" requireReinstallation="true" /> <package id="System.Collections" version="4.3.0" targetFramework="net461" /> <package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net461" /> <package id="System.Collections.Immutable" version="1.5.0" targetFramework="net461" /> <package id="System.ComponentModel" version="4.3.0" targetFramework="net461" /> <package id="System.Console" version="4.3.1" targetFramework="net461" /> <package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net461" /> - <package id="System.Diagnostics.DiagnosticSource" version="4.5.0" targetFramework="net461" /> + <package id="System.Diagnostics.DiagnosticSource" version="4.5.1" targetFramework="net472" /> <package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net461" /> - <package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="net461" /> + <package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="net461" requireReinstallation="true" /> <package id="System.Globalization" version="4.3.0" targetFramework="net461" /> <package id="System.Globalization.Calendars" version="4.3.0" targetFramework="net461" /> <package id="System.Interactive.Async" version="3.2.0" targetFramework="net461" /> - <package id="System.IO" version="4.3.0" targetFramework="net461" /> + <package id="System.IO" version="4.3.0" targetFramework="net461" requireReinstallation="true" /> <package id="System.IO.Compression" version="4.3.0" targetFramework="net461" /> <package id="System.IO.Compression.ZipFile" version="4.3.0" targetFramework="net461" /> <package id="System.IO.FileSystem" version="4.3.0" targetFramework="net461" /> <package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net461" /> - <package id="System.Linq" version="4.3.0" targetFramework="net461" /> - <package id="System.Linq.Expressions" version="4.3.0" targetFramework="net461" /> - <package id="System.Net.Http" version="4.3.3" targetFramework="net461" /> - <package id="System.Net.Primitives" version="4.3.0" targetFramework="net461" /> + <package id="System.Linq" version="4.3.0" targetFramework="net461" requireReinstallation="true" /> + <package id="System.Linq.Expressions" version="4.3.0" targetFramework="net461" requireReinstallation="true" /> + <package id="System.Net.Http" version="4.3.4" targetFramework="net472" /> + <package id="System.Net.Primitives" version="4.3.1" targetFramework="net472" /> <package id="System.Net.Sockets" version="4.3.0" targetFramework="net461" /> <package id="System.ObjectModel" version="4.3.0" targetFramework="net461" /> - <package id="System.Reflection" version="4.3.0" targetFramework="net461" /> + <package id="System.Reflection" version="4.3.0" targetFramework="net461" requireReinstallation="true" /> <package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net461" /> <package id="System.Reflection.Primitives" version="4.3.0" targetFramework="net461" /> <package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net461" /> - <package id="System.Runtime" version="4.3.0" targetFramework="net461" /> - <package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net461" /> + <package id="System.Runtime" version="4.3.1" targetFramework="net472" /> + <package id="System.Runtime.Extensions" version="4.3.1" targetFramework="net472" /> <package id="System.Runtime.Handles" version="4.3.0" targetFramework="net461" /> - <package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net461" /> + <package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net461" requireReinstallation="true" /> <package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net461" /> <package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net461" /> - <package id="System.Security.Cryptography.Algorithms" version="4.3.1" targetFramework="net461" /> + <package id="System.Security.Cryptography.Algorithms" version="4.3.1" targetFramework="net461" requireReinstallation="true" /> <package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net461" /> <package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net461" /> <package id="System.Security.Cryptography.X509Certificates" version="4.3.2" targetFramework="net461" /> <package id="System.Text.Encoding" version="4.3.0" targetFramework="net461" /> <package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net461" /> - <package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="net461" /> + <package id="System.Text.RegularExpressions" version="4.3.1" targetFramework="net472" /> <package id="System.Threading" version="4.3.0" targetFramework="net461" /> <package id="System.Threading.Tasks" version="4.3.0" targetFramework="net461" /> <package id="System.Threading.Timer" version="4.3.0" targetFramework="net461" /> |