This repository was archived by the owner on Jan 8, 2022. It is now read-only.

Description
Issue description
Calling toJSON() from an instance of a SlashCommandBuilder without setting required parameters (name and description) throw an error that seem from zod that isn't useful at all to understand the problem because of the size of the error and don't say what parameter is missing.
Original message:
When creating a SlashCommandBuilder and doing toJSON() zod thrown about an recived undefined and expect a string.
Step to reproduce:
- Import
SlashCommandBuilder from @discordjs/builders
- Create a new Builder and call
toJSON()
- zod should throw an error that isn't useful at all
zodError.log
Code sample
import { SlashCommandBuilder } from "@discordjs/builders";
new SlashCommandBuilder().setName("test").toJSON();
@discordjs/builders version
0.9.0
Node.js version
node.js v17.2.0 | Typescript 4.5.4
Operating system
Windows 11
Priority this issue should have
High (immediate attention needed)