new libs, prune is back, fixed conversation perms, fixed "general"
This commit is contained in:
@ -65,7 +65,7 @@ namespace NadekoBot.Classes.Music {
|
||||
if (VoiceClient == null) {
|
||||
Console.WriteLine($"Joining voice channel [{DateTime.Now.Second}]");
|
||||
//todo add a new event, to tell people nadeko is trying to join
|
||||
VoiceClient = await NadekoBot.client.Audio().Join(VoiceChannel);
|
||||
VoiceClient = await VoiceChannel.JoinAudio();
|
||||
Console.WriteLine($"Joined voicechannel [{DateTime.Now.Second}]");
|
||||
}
|
||||
await Task.Factory.StartNew(async () => await CurrentSong?.Start(), TaskCreationOptions.LongRunning).Unwrap();
|
||||
|
@ -264,7 +264,7 @@ namespace NadekoBot.Classes.Music {
|
||||
Console.WriteLine("Nothing was buffered, try another song and check your GoogleApikey.");
|
||||
}
|
||||
|
||||
int blockSize = 1920 * NadekoBot.client.Audio().Config.Channels;
|
||||
int blockSize = 1920 * NadekoBot.client.Services.Get<AudioService>().Config.Channels;
|
||||
byte[] voiceBuffer = new byte[blockSize];
|
||||
|
||||
if (parent.OnStarted != null)
|
||||
|
@ -28,7 +28,7 @@ namespace NadekoBot
|
||||
static NadekoStats() { }
|
||||
|
||||
private NadekoStats() {
|
||||
_service = NadekoBot.client.Commands();
|
||||
_service = NadekoBot.client.Services.Get<CommandService>();
|
||||
_client = NadekoBot.client;
|
||||
|
||||
_statsSW = new Stopwatch();
|
||||
|
@ -51,7 +51,7 @@ namespace NadekoBot.Classes {
|
||||
if (string.IsNullOrWhiteSpace(commandText))
|
||||
throw new ArgumentNullException(nameof(commandText));
|
||||
|
||||
foreach (var com in NadekoBot.client.Commands().AllCommands) {
|
||||
foreach (var com in NadekoBot.client.Services.Get<CommandService>().AllCommands) {
|
||||
if (com.Text.ToLower().Equals(commandText.ToLower()))
|
||||
return com.Text;
|
||||
}
|
||||
@ -73,7 +73,7 @@ namespace NadekoBot.Classes {
|
||||
internal static Channel ValidateChannel(Server server, string channelName) {
|
||||
if (string.IsNullOrWhiteSpace(channelName))
|
||||
throw new ArgumentNullException(nameof(channelName));
|
||||
var channel = server.FindChannels(channelName).FirstOrDefault();
|
||||
var channel = server.FindChannels(channelName, ChannelType.Text).FirstOrDefault();
|
||||
if (channel == null)
|
||||
throw new NullReferenceException("That channel does not exist.");
|
||||
return channel;
|
||||
|
Reference in New Issue
Block a user