Can't seem to create a prompt with a Discord ID
Closed this issue · 0 comments
ColdDev commented
Describe the bug
I'm working on a script as part of a larger project that will allow the developer to generate test data for working on improving existing features and adding new ones.
The issue is, for some reason, I'm trying to get this script to include a Discord ID, but whether I choose type "text" or type "number", prompts kicks out its own internal error telling me to "Please Provide A Valid Value."
To Reproduce
Steps to reproduce the behavior:
- Create a prompt as follows:
import prompts from "prompts";
(async () => {
const response = await prompts([
{
type: "text",
name: "discordId",
message: "Enter your Discord ID.",
},
]);
console.log(response); // Should output { discordId: "...etc" }
})();
- Enter a valid Discord ID (usually a sequence of 18 numbers).
- You should see the issue where it says "Please Enter A Valid Value."
Expected behavior
I expected this to work absolutely fine, with no issues, but instead this error occurs.
System
- OS: Manjaro Linux
- Terminal:
bash
- Node version:
v20.13.0