This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user