-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
37 lines (31 loc) · 929 Bytes
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { colors } from "./colors/index.ts";
import { Logger } from "./logger/index.ts";
import { Prompt } from "./prompt/index.ts";
import { Logging } from "./function/logging/index.ts";
import { settings } from "./function/settings/index.ts";
while (true) {
Prompt.showTitle();
const mode = Prompt.showOptions();
switch (mode) {
case "clogger":
await Logging.getChannelMessages();
break;
case "plogger":
await Logging.getSpecificUserMessages();
break;
case "settings":
await settings.tokenSetting();
break;
default:
Logger.log("Invalid Select Input", "error");
break;
}
const continuePrompt = prompt(
`\n${colors.brightYellow}Return to menu?${colors.reset} (Y/n): `,
);
if (continuePrompt?.toLowerCase() !== "y") {
break;
}
await Deno.stdout.write(new TextEncoder().encode("\x1b[2J\x1b[H"));
}
Logger.log("Goodbye! :)", "success");