Adding default diceRecipe

This commit is contained in:
Sean "Solao Bajiuik" Stoves 2020-08-05 20:55:11 -04:00
parent 01d504c077
commit 345304537a

View File

@ -23,7 +23,12 @@ namespace ChaosBot.Discord.Modules.User
{ {
try try
{ {
string diceRecipe = Strings.Join(args, " "); string diceRecipe = null;
if (args.Length > 1)
diceRecipe = Strings.Join(args, " ");
else
diceRecipe = "1d20";
var sb = new StringBuilder(); var sb = new StringBuilder();
var embed = new EmbedBuilder(); var embed = new EmbedBuilder();
@ -48,9 +53,11 @@ namespace ChaosBot.Discord.Modules.User
} }
catch (Exception ex) catch (Exception ex)
{ {
_logger.Error($"{MethodBase.GetCurrentMethod().ReflectedType.FullName}: Exception [{ex}] thrown, <[{ex.Message}]>."); _logger.Error(
$"{MethodBase.GetCurrentMethod().ReflectedType.FullName}: Exception [{ex}] thrown, <[{ex.Message}]>.");
} }
} }
private string DiceOutput(RollResult rollResult) private string DiceOutput(RollResult rollResult)
{ {
if (rollResult.RollRoot == null) return ""; if (rollResult.RollRoot == null) return "";