Skip div(md()) submit #1229
-
Is it possible to skip I have a script that connects to VPN, and the only way I found to skip submitting is to omit try {
div(md(`Checking VPN status...`));
const connected = await state();
await div({
html: md(
`VPN status: ${connected ? "**Connected ✅**" : "**Disconnected ❎**"}`
),
enter: 'Press "Enter" to toggle VPN connection',
});
if (connected) {
div(md("Disconnecting..."));
await disconnect();
await div(md("VPN status: **Disconnected ❎**"));
} else {
div(md("Connecting..."));
await connect();
await div(md("VPN status: **Connected ✅**"));
}
} catch (error) {
console.log("[ERROR]: ", error);
} But in this case a loader is not displayed. I can't figure out how to do it in a right way. Please help me 🙏 |
Beta Was this translation helpful? Give feedback.
Answered by
johnlindquist
Apr 30, 2023
Replies: 1 comment 3 replies
-
@DavidArutiunian maybe something like: setTimeout(()=> { await div() "submit" is a global which causes the current visible prompt to end. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
davidarny
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@DavidArutiunian maybe something like:
setTimeout(()=> {
submit()
},1000)
await div()
"submit" is a global which causes the current visible prompt to end.