mirror of
https://github.com/tcsenpai/PerplexiBot.git
synced 2025-06-06 19:25:22 +00:00
12 lines
290 B
TypeScript
12 lines
290 B
TypeScript
import * as readline from "readline/promises";
|
|
|
|
export default async function readin(q: string = ""): Promise<string> {
|
|
const rl = readline.createInterface({
|
|
input: process.stdin,
|
|
output: process.stdout,
|
|
});
|
|
let answer = await rl.question(q);
|
|
rl.close();
|
|
return answer;
|
|
}
|