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.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Discord;
|
||||||
|
using Discord.Net.Queue;
|
||||||
using DiscordBot.Discord.Core;
|
using DiscordBot.Discord.Core;
|
||||||
using PluginManager;
|
using PluginManager;
|
||||||
using PluginManager.Items;
|
using PluginManager.Items;
|
||||||
@@ -73,7 +75,6 @@ public class Program
|
|||||||
|
|
||||||
Config.SaveConfig();
|
Config.SaveConfig();
|
||||||
|
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
Console.ForegroundColor = ConsoleColor.White;
|
Console.ForegroundColor = ConsoleColor.White;
|
||||||
|
|||||||
@@ -64,15 +64,16 @@ internal class Play : DBCommand
|
|||||||
}
|
}
|
||||||
while (false);
|
while (false);
|
||||||
|
|
||||||
|
|
||||||
Data.voiceChannel = (context.User as IGuildUser)?.VoiceChannel;
|
Data.voiceChannel = (context.User as IGuildUser)?.VoiceChannel;
|
||||||
|
|
||||||
if (Data.voiceChannel == null)
|
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.");
|
await context.Channel.SendMessageAsync("User must be in a voice channel, or a voice channel must be passed as an argument.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Data.audioClient = await Data.voiceChannel.ConnectAsync();
|
Data.audioClient = await Data.voiceChannel.ConnectAsync(true);
|
||||||
|
|
||||||
|
|
||||||
using (var ffmpeg = CreateStream(path))
|
using (var ffmpeg = CreateStream(path))
|
||||||
using (var output = ffmpeg.StandardOutput.BaseStream)
|
using (var output = ffmpeg.StandardOutput.BaseStream)
|
||||||
|
|||||||
Reference in New Issue
Block a user