Crates.io | hubbub |
lib.rs | hubbub |
version | 0.10.1 |
source | src |
created_at | 2024-06-16 06:39:22.759656 |
updated_at | 2024-10-21 00:10:59.358214 |
description | Discord self-bot library for rust |
homepage | |
repository | https://github.com/zxcv05/hubbub |
max_upload_size | |
id | 1273305 |
size | 245,835 |
Rust library for creating discord self-bots (very early in development)
cargo add hubbub
hubbub::prelude::*:
struct App {
// ...
}
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let mut client = Client::new(
App { /* ... */ },
/* Event handler */
).await?;
client.token(/* Token */).await?;
client.login().await?;
client.run().await?;
}
async fn main() {
// ...
/* Event handler */
Box::from(
|ctx: Ctx, ws: Ws, model: Model<App>, msg: DiscordMessage| async move {
/* do work here */
}
)
// ...
}
Context
and DiscordMessage
structsprelude