|
|
|
@ -3,6 +3,7 @@ using Console.Waterworks.Attributes;
|
|
|
|
|
using System; |
|
|
|
|
using static WetPancake.Pancake; |
|
|
|
|
using static System.Environment; |
|
|
|
|
using System.Diagnostics; |
|
|
|
|
|
|
|
|
|
namespace WetPancakeCLI |
|
|
|
|
{ |
|
|
|
@ -30,7 +31,18 @@ namespace WetPancakeCLI
|
|
|
|
|
[Description("Generates random text, the number of sentences generated is randomly determined.")] |
|
|
|
|
[Parameters("none")] |
|
|
|
|
[Usage("> GenerateRandomText")] |
|
|
|
|
public static string GenerateRandomText() => RequestRandomText(); |
|
|
|
|
public static string GenerateRandomText() |
|
|
|
|
{ |
|
|
|
|
string result = String.Empty; |
|
|
|
|
try { result = RequestRandomText(); } |
|
|
|
|
catch (Exception e) |
|
|
|
|
{ |
|
|
|
|
Debug.WriteLine(e.Message); |
|
|
|
|
System.Console.WriteLine("[ERROR] Unable to complete request. Re-executing command..."); |
|
|
|
|
result = RequestRandomText(); |
|
|
|
|
} |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
[ListCommand] |
|
|
|
|
[Description ("Generates text using the gibberish level and number of sentences specified by the user.")] |
|
|
|
|