Bot dashboard
Build, publish, and manage your bots.
Your bot apps are tied to the same account you use on the main Darknessdragon site, so each creation stays connected to the correct developer.
My bot apps
Use the bot libraries
Download the client into your bot project, then load your API token from the DARKNESSDRAGON_BOT_TOKEN environment variable.
Python
Install from PyPI after publication:
python3 -m pip install darknessdragon.py
For an unpublished checkout, install with `python3 -m pip install ./lib/python`.
Download the standard-library client:
mkdir -p darknessdragon-bot curl -fsSL 'https://bot.darknessdragon.com/sdk.php?file=python&v=3' -o darknessdragon-bot/darknessdragon_bot.py curl -fsSL 'https://bot.darknessdragon.com/sdk.php?file=python-example&v=1' -o darknessdragon-bot/example.py cd darknessdragon-bot export DARKNESSDRAGON_BOT_TOKEN='YOUR_BOT_TOKEN' python3 example.py
The downloaded example imports the client and lists installed servers and permitted channels.
Rust
Download the library into `vendor/darknessdragon-bot`:
mkdir -p vendor/darknessdragon-bot/src curl -fsSL 'https://bot.darknessdragon.com/sdk.php?file=rust-manifest' -o vendor/darknessdragon-bot/Cargo.toml curl -fsSL 'https://bot.darknessdragon.com/sdk.php?file=rust-lib' -o vendor/darknessdragon-bot/src/lib.rs curl -fsSL 'https://bot.darknessdragon.com/sdk.php?file=rust-settings' -o vendor/darknessdragon-bot/src/settings.rs
Add this to Cargo.toml:
[dependencies]
darknessdragon-bot = { path = "vendor/darknessdragon-bot" }
Import and initialize the client in your Rust bot:
use darknessdragon_bot::settings;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let bot = settings::client()?;
println!("Connected to {} servers", bot.servers()?.len());
Ok(())
}