Ask user what he wants an opinion about if nothing is given
This commit is contained in:
parent
50b5a9f735
commit
4407214a8e
|
@ -9,6 +9,10 @@ namespace DeukBot4.Utilities
|
|||
public static async Task<string> GetOpinion(CommandRequest request)
|
||||
{
|
||||
var extend = request.Parameters[0].AsString().ToLowerInvariant();
|
||||
if (string.IsNullOrWhiteSpace(extend))
|
||||
{
|
||||
return "Think about what?";
|
||||
}
|
||||
var random = new Random(extend.GetHashCode());
|
||||
var positive = random.Next(-20, 80) < (int) request.RequestPermissions;
|
||||
|
||||
|
|
Loading…
Reference in New Issue