adjust Failure method stack
This commit is contained in:
parent
1dd0a31424
commit
12b265a616
1 changed files with 13 additions and 9 deletions
|
|
@ -183,16 +183,26 @@ namespace SecondBotEvents.Services
|
||||||
return new { reply = input, status = true };
|
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
|
// @todo Command history storage system
|
||||||
return new { reply = input, status = false };
|
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)
|
protected object Failure(string input)
|
||||||
{
|
{
|
||||||
// @todo Command history storage system
|
return Failure(input, getCallingCommand(), new string[] { }, null);
|
||||||
return new { reply = input, command = getCallingCommand(), status = false };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected string getCallingCommand()
|
protected string getCallingCommand()
|
||||||
|
|
@ -200,12 +210,6 @@ namespace SecondBotEvents.Services
|
||||||
return (new System.Diagnostics.StackTrace()).GetFrame(2).GetMethod().Name;
|
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)
|
protected object Failure(string input, string command)
|
||||||
{
|
{
|
||||||
return Failure(input, command, new string[] { });
|
return Failure(input, command, new string[] { });
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue