Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run two spinners at the same #227

Closed
SNKYNinja opened this issue Jul 27, 2023 · 1 comment
Closed

Run two spinners at the same #227

SNKYNinja opened this issue Jul 27, 2023 · 1 comment

Comments

@SNKYNinja
Copy link

SNKYNinja commented Jul 27, 2023

I have a lavalink node connection, which connects to two nodes on startup and i have an event with this nodeConnection function, but since the connection runs synchronous it creates two spinners at the same. Is there any way I can run two spinners at the same time since currently it just kinda bugs out and edits the existing spinner on timeout

Code:

import { Node } from 'poru';
import ora from 'ora';
import chalk from 'chalk';

export const nodeConnect = async (node: Node) => {
    // console.log(chalk.redBright.bold(`[NODE]`) + ` ${node.name} has been loaded successfully`);
    const spinner = ora(`Connecting to ${node.name}`).start();
    setTimeout(() => {
        spinner.color = 'yellow';
        spinner.text = `${chalk.bold.yellow('[NODE]')} Connected to ${node.name}`;
    }, 10 * 1000);
};

Thank You

@sindresorhus
Copy link
Owner

Duplicate of #116

@sindresorhus sindresorhus marked this as a duplicate of #116 Jul 28, 2023
@sindresorhus sindresorhus closed this as not planned Won't fix, can't repro, duplicate, stale Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants