基于 ricq 的 QQ 机器人框架,提供一致、易用、简洁的 API。
Examples
Rust
use ;
use Result;
async
Python
, = await
await
await
基于 ricq 的 QQ 机器人框架,提供一致、易用、简洁的 API。
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!()
}
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())