This commit is contained in:
stjet
2024-09-13 22:20:04 +00:00
parent c2d1cd2af1
commit 1704c10dfc
4 changed files with 4 additions and 4 deletions

View File

@@ -18,7 +18,7 @@ async function run(interaction: ChatInputCommandInteraction) {
const usable: boolean = ((await options.get("usable"))?.value ?? item.usable) as boolean;
//to add multiple roles, people will have to use /edit_item, I guess? augh
const required_role = (await options.get("required_role"))?.role;
if (price <= 0) throw new BotError("Price cannot be zero or negative");
if (price < 0) throw new BotError("Price cannot be negative");
//name and description char limits (based on discord embed field name/value limits)
if (description.length > 900) throw new BotError("Item description cannot be more than 1024 characters"); //true limit is 1024 but we want some margin for other info
const existing = delete_existing_roles ? [] : item.roles_required;