Limit odds to prevent hang
This commit is contained in:
parent
1ebd111e85
commit
951c2f6f29
|
@ -127,6 +127,7 @@ if (!config.token) {
|
|||
var party = (i.options as CommandInteractionOptionResolver).getString("with_party") || "Independent";
|
||||
var color = (i.options as CommandInteractionOptionResolver).getString("with_color") || "#bfab22";
|
||||
var odds = (i.options as CommandInteractionOptionResolver).getNumber("with_odds") || 0.33;
|
||||
if (odds > 1500) { odds = 1500; } else if (odds < -1500) { odds = -1500; }
|
||||
if (!/^#[0-9A-Fa-f]{3,6}$/.test(color)) {
|
||||
await i.editReply("Please provide a valid hex color code");
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue