A Python library for running multiple Discord bots at once.
Project description
BubbleNova
BubbleNova is a Python framework developed to simplify the concurrent execution of multiple Discord bots (or other scripts). It achieves this by running the bots in separate threads, allowing them to operate independently and concurrently.
How it Works
BubbleNova operates based on a dictionary input that contains the name of your bot (or script) and its directory path relative to the script where you import BubbleNova. It starts each bot in its own thread, ensuring they run in separate, isolated environments.
Usage
To use BubbleNova, follow these steps:
- Import the
BubbleNova
library into your Python script.
import BubbleNova
- Create a dictionary that maps your bot names to their respective script directories:
bot_list = {
"SoapBot": "bots/SoapBot.py",
"Bubbles": "bots/Bubbles.py"
}
- Start the bots using the start_bots function, passing in your bot list as an argument:
BubbleNova.start_bots(bot_list)
When you run your script, BubbleNova will launch each bot in a separate thread, allowing them to operate concurrently.
Example
Here's a sample code snippet demonstrating how to use BubbleNova:
import BubbleNova
bot_list = {
"SoapBot": "bots/SoapBot.py",
"Bubbles": "bots/Bubbles.py"
}
BubbleNova.start_bots(bot_list)
print("This code here can still run even though the bots are also still online!")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for BubbleNova-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 799c98d063e1ffd4932e4d03e9bcb3b691a111ba633bd82aeb555f51a3104721 |
|
MD5 | c9c00e85a8bb033b196faed04486377c |
|
BLAKE2b-256 | eaee0b1820384dbba1a9953f5c19a6fd2124ffc706e6b1ad961e95f4ab208b22 |