diff --git a/BUILDS/net6.0/MusicCommands.dll b/BUILDS/net6.0/MusicCommands.dll index 729722c..2349924 100644 Binary files a/BUILDS/net6.0/MusicCommands.dll and b/BUILDS/net6.0/MusicCommands.dll differ diff --git a/BUILDS/net6.0/Plugins/Commands/MusicCommands.dll b/BUILDS/net6.0/Plugins/Commands/MusicCommands.dll index 729722c..2349924 100644 Binary files a/BUILDS/net6.0/Plugins/Commands/MusicCommands.dll and b/BUILDS/net6.0/Plugins/Commands/MusicCommands.dll differ diff --git a/DiscordBot/Program.cs b/DiscordBot/Program.cs index 0701871..4f5802a 100644 --- a/DiscordBot/Program.cs +++ b/DiscordBot/Program.cs @@ -3,6 +3,8 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading.Tasks; +using Discord; +using Discord.Net.Queue; using DiscordBot.Discord.Core; using PluginManager; using PluginManager.Items; @@ -73,7 +75,6 @@ public class Program Config.SaveConfig(); - while (true) { Console.ForegroundColor = ConsoleColor.White; diff --git a/MusicCommands/Play.cs b/MusicCommands/Play.cs index eb6d73d..bf98e28 100644 --- a/MusicCommands/Play.cs +++ b/MusicCommands/Play.cs @@ -64,15 +64,16 @@ internal class Play : DBCommand } while (false); - Data.voiceChannel = (context.User as IGuildUser)?.VoiceChannel; + if (Data.voiceChannel == null) { await context.Channel.SendMessageAsync("User must be in a voice channel, or a voice channel must be passed as an argument."); return; } - Data.audioClient = await Data.voiceChannel.ConnectAsync(); + Data.audioClient = await Data.voiceChannel.ConnectAsync(true); + using (var ffmpeg = CreateStream(path)) using (var output = ffmpeg.StandardOutput.BaseStream)