animal racing reposting fix
This commit is contained in:
parent
5db1214440
commit
0521a71fa8
@ -46,11 +46,20 @@ namespace NadekoBot
|
||||
|
||||
commandService.CommandExecuted += StatsCollector_RanCommand;
|
||||
commandService.CommandFinished += CommandService_CommandFinished;
|
||||
File.Create("errors.txt");
|
||||
commandService.CommandErrored += (s, e) => File.AppendAllText("errors.txt", $@"Command: {e.Command}
|
||||
commandService.CommandErrored += (s, e) =>
|
||||
{
|
||||
try
|
||||
{
|
||||
if (e.ErrorType == CommandErrorType.Exception)
|
||||
File.AppendAllText("errors.txt", $@"Command: {e.Command}
|
||||
{e.Exception}
|
||||
-------------------------------------
|
||||
");
|
||||
}
|
||||
catch {
|
||||
Console.WriteLine("Command errored errorring");
|
||||
}
|
||||
};
|
||||
|
||||
Task.Run(StartCollecting);
|
||||
|
||||
|
@ -194,9 +194,8 @@ namespace NadekoBot.Modules.Gambling.Commands
|
||||
|
||||
private void Client_MessageReceived(object sender, MessageEventArgs e)
|
||||
{
|
||||
if (e.Message.IsAuthor)
|
||||
if (e.Message.IsAuthor || e.Channel.IsPrivate || e.Channel != raceChannel)
|
||||
return;
|
||||
Console.WriteLine("Message received " + messagesSinceGameStarted);
|
||||
messagesSinceGameStarted++;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user