ffmpeg won't log anymore
This commit is contained in:
parent
c08498af54
commit
aa86359ea0
@ -172,12 +172,9 @@ namespace NadekoBot.Classes.Music {
|
|||||||
//start feeding the buffer
|
//start feeding the buffer
|
||||||
var p = Process.Start(new ProcessStartInfo {
|
var p = Process.Start(new ProcessStartInfo {
|
||||||
FileName = "ffmpeg",
|
FileName = "ffmpeg",
|
||||||
Arguments = $"-i {Url} -f s16le -ar 48000 -ac 2 pipe:1",
|
Arguments = $"-i {Url} -f s16le -ar 48000 -ac 2 pipe:1 -loglevel quiet", //+ (NadekoBot.IsLinux ? "2> /dev/null" : "2>NUL"),
|
||||||
UseShellExecute = false,
|
UseShellExecute = false,
|
||||||
RedirectStandardOutput = true,
|
RedirectStandardOutput = true,
|
||||||
RedirectStandardError = false,
|
|
||||||
CreateNoWindow = true,
|
|
||||||
WindowStyle = ProcessWindowStyle.Hidden,
|
|
||||||
});
|
});
|
||||||
int attempt = 0;
|
int attempt = 0;
|
||||||
while (true) {
|
while (true) {
|
||||||
|
@ -30,13 +30,15 @@ namespace NadekoBot {
|
|||||||
botMention = creds.BotMention;
|
botMention = creds.BotMention;
|
||||||
if (string.IsNullOrWhiteSpace(creds.GoogleAPIKey)) {
|
if (string.IsNullOrWhiteSpace(creds.GoogleAPIKey)) {
|
||||||
Console.WriteLine("No google api key found. You will not be able to use music and links won't be shortened.");
|
Console.WriteLine("No google api key found. You will not be able to use music and links won't be shortened.");
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
Console.WriteLine("Google API key provided.");
|
Console.WriteLine("Google API key provided.");
|
||||||
GoogleAPIKey = creds.GoogleAPIKey;
|
GoogleAPIKey = creds.GoogleAPIKey;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrWhiteSpace(creds.TrelloAppKey)) {
|
if (string.IsNullOrWhiteSpace(creds.TrelloAppKey)) {
|
||||||
Console.WriteLine("No trello appkey found. You will not be able to use trello commands.");
|
Console.WriteLine("No trello appkey found. You will not be able to use trello commands.");
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
Console.WriteLine("Trello app key provided.");
|
Console.WriteLine("Trello app key provided.");
|
||||||
TrelloAppKey = creds.TrelloAppKey;
|
TrelloAppKey = creds.TrelloAppKey;
|
||||||
loadTrello = true;
|
loadTrello = true;
|
||||||
@ -54,7 +56,8 @@ namespace NadekoBot {
|
|||||||
|
|
||||||
OwnerID = creds.OwnerID;
|
OwnerID = creds.OwnerID;
|
||||||
password = creds.Password;
|
password = creds.Password;
|
||||||
} catch (Exception ex) {
|
}
|
||||||
|
catch (Exception ex) {
|
||||||
Console.WriteLine($"Failed to load stuff from credentials.json, RTFM\n{ex.Message}");
|
Console.WriteLine($"Failed to load stuff from credentials.json, RTFM\n{ex.Message}");
|
||||||
Console.ReadKey();
|
Console.ReadKey();
|
||||||
return;
|
return;
|
||||||
@ -70,7 +73,7 @@ namespace NadekoBot {
|
|||||||
var commandService = new CommandService(new CommandServiceConfigBuilder {
|
var commandService = new CommandService(new CommandServiceConfigBuilder {
|
||||||
AllowMentionPrefix = false,
|
AllowMentionPrefix = false,
|
||||||
CustomPrefixHandler = m => 0,
|
CustomPrefixHandler = m => 0,
|
||||||
HelpMode = HelpMode.Disabled
|
HelpMode = HelpMode.Disabled,
|
||||||
});
|
});
|
||||||
|
|
||||||
//reply to personal messages and forward if enabled.
|
//reply to personal messages and forward if enabled.
|
||||||
@ -121,14 +124,14 @@ namespace NadekoBot {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
OwnerPrivateChannel = await client.CreatePrivateChannel(OwnerID);
|
OwnerPrivateChannel = await client.CreatePrivateChannel(OwnerID);
|
||||||
} catch {
|
}
|
||||||
|
catch {
|
||||||
Console.WriteLine("Failed creating private channel with the owner");
|
Console.WriteLine("Failed creating private channel with the owner");
|
||||||
}
|
}
|
||||||
|
|
||||||
Classes.Permissions.PermissionsHandler.Initialize();
|
Classes.Permissions.PermissionsHandler.Initialize();
|
||||||
|
|
||||||
client.ClientAPI.SendingRequest += (s, e) =>
|
client.ClientAPI.SendingRequest += (s, e) => {
|
||||||
{
|
|
||||||
var request = e.Request as Discord.API.Client.Rest.SendMessageRequest;
|
var request = e.Request as Discord.API.Client.Rest.SendMessageRequest;
|
||||||
if (request != null) {
|
if (request != null) {
|
||||||
if (string.IsNullOrWhiteSpace(request.Content))
|
if (string.IsNullOrWhiteSpace(request.Content))
|
||||||
@ -157,7 +160,8 @@ namespace NadekoBot {
|
|||||||
await (await client.GetInvite(e.Message.Text)).Accept();
|
await (await client.GetInvite(e.Message.Text)).Accept();
|
||||||
await e.Send("I got in!");
|
await e.Send("I got in!");
|
||||||
return;
|
return;
|
||||||
} catch {
|
}
|
||||||
|
catch {
|
||||||
if (e.User.Id == 109338686889476096) { //carbonitex invite
|
if (e.User.Id == 109338686889476096) { //carbonitex invite
|
||||||
await e.Send("Failed to join the server.");
|
await e.Send("Failed to join the server.");
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user