adjust Failure method stack

This commit is contained in:
Madpeter 2022-06-01 16:20:24 +01:00
parent 1dd0a31424
commit 12b265a616

View file

@ -183,16 +183,26 @@ namespace SecondBotEvents.Services
return new { reply = input, status = true };
}
protected object Failure(string input, string command, string[] args)
protected object Failure(string input, string command, string[] args, string whyfailed)
{
// @todo Command history storage system
return new { reply = input, status = false };
}
protected object Failure(string input, string command, string[] args)
{
return Failure(input, command, args, null);
}
protected object Failure(string input, string[] args)
{
return Failure(input, getCallingCommand(), args, null);
}
protected object Failure(string input)
{
// @todo Command history storage system
return new { reply = input, command = getCallingCommand(), status = false };
return Failure(input, getCallingCommand(), new string[] { }, null);
}
protected string getCallingCommand()
@ -200,12 +210,6 @@ namespace SecondBotEvents.Services
return (new System.Diagnostics.StackTrace()).GetFrame(2).GetMethod().Name;
}
protected object Failure(string input, string command, string[] args, string whyfailed)
{
// @todo Command history storage system
return new { reply = input, status = false };
}
protected object Failure(string input, string command)
{
return Failure(input, command, new string[] { });