botrs/
lib.rs

1// the api indeed have a lot of arguments
2#![allow(clippy::too_many_arguments)]
3#![doc = include_str!("../README.md")]
4
5pub mod api;
6pub mod audio;
7pub mod client;
8pub mod connection;
9pub mod error;
10pub mod forum;
11pub mod gateway;
12pub mod http;
13pub mod intents;
14pub mod interaction;
15pub mod manage;
16pub mod models;
17pub mod reaction;
18pub mod token;
19
20// Re-export main types for convenience
21pub use api::BotApi;
22pub use audio::{Audio, AudioControl, AudioStatus, PublicAudio, PublicAudioType};
23pub use client::{Client, Context, EventHandler};
24pub use connection::{ConnectionSession, ConnectionState, Session};
25pub use error::{BotError, Result};
26pub use forum::{Content, Format, OpenThread, Thread, ThreadInfo, Title};
27pub use intents::Intents;
28pub use interaction::{Interaction, InteractionData, InteractionDataType, InteractionType};
29pub use manage::{C2CManageEvent, GroupManageEvent, ManageEventType};
30pub use models::gateway::Ready;
31pub use models::*;
32pub use reaction::{Reaction, ReactionTarget, ReactionTargetType, ReactionUsers};
33pub use token::Token;
34
35/// The current version of the library
36pub const VERSION: &str = env!("CARGO_PKG_VERSION");
37
38/// Default timeout for HTTP requests in seconds
39pub const DEFAULT_TIMEOUT: u64 = 30;
40
41/// Default WebSocket URL for QQ Guild API
42pub const DEFAULT_WS_URL: &str = "wss://api.sgroup.qq.com/websocket";
43
44/// Default API base URL for QQ Guild API
45pub const DEFAULT_API_URL: &str = "https://api.sgroup.qq.com";
46
47/// Sandbox API base URL for testing
48pub const SANDBOX_API_URL: &str = "https://sandbox.api.sgroup.qq.com";