Expand description
基于 ricq 的 QQ 机器人框架,提供一致、易用、简洁的 API。
Examples
Rust
use libawr::{login, msg, Protocol};
use anyhow::Result;
#[tokio::main]
async fn main() -> Result<()> {
let (client, alive) = login!(12345678, password="******", protocol=Protocol::IPad).await?;
client.friend(23456789).send(msg!("Hello, world!")).await?;
alive.auto_reconnect().await?;
unreachable!()
}
Python
import asyncio
import awr
async def main():
client, alive = await awr.login(12345678, password="******", protocol=awr.Protocol.IPad)
await client.friend(23456789).send("Hello, world!")
await alive.auto_reconnect()
asyncio.run(main())
Re-exports
pub use client::Client;
pub use login::login_with_password;
pub use login::login_with_password_md5;
pub use login::login_with_qrcode;