mirror of
https://gitlab.com/Deukhoofd/DeukBot4.git
synced 2025-10-27 17:00:05 +00:00
Ask user what he wants an opinion about if nothing is given
This commit is contained in:
@@ -9,6 +9,10 @@ namespace DeukBot4.Utilities
|
|||||||
public static async Task<string> GetOpinion(CommandRequest request)
|
public static async Task<string> GetOpinion(CommandRequest request)
|
||||||
{
|
{
|
||||||
var extend = request.Parameters[0].AsString().ToLowerInvariant();
|
var extend = request.Parameters[0].AsString().ToLowerInvariant();
|
||||||
|
if (string.IsNullOrWhiteSpace(extend))
|
||||||
|
{
|
||||||
|
return "Think about what?";
|
||||||
|
}
|
||||||
var random = new Random(extend.GetHashCode());
|
var random = new Random(extend.GetHashCode());
|
||||||
var positive = random.Next(-20, 80) < (int) request.RequestPermissions;
|
var positive = random.Next(-20, 80) < (int) request.RequestPermissions;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user