Skip to content

ReconnectedCC/FerrisBox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FerrisBox

An asynchronous Chatbox client implementation for ReconnectedCC written in Rust

Example usage

Start by adding the following to your Cargo.toml:

futures = "0.3.31"
ferrisbox = { git = "https://github.com/ReconnectedCC/FerrisBox.git" }

Then you can start using the library:

use ferrisbox::{packets::client::tell::TellPacket, ChatboxClientInstance};

// You can use Some("some chatbox endpoint") to use a custom chatbox endpoint
// We are using default value of `wss://chat.reconnected.cc/v2`
let mut client = ChatboxClientInstance::new(license, None).await;

// Telling a user something
client
    .tell(TellPacket {
        user: "g6ys".to_owned(),
        text: "Hello, World!".to_owned(),
        name: None,
        mode: None,
    })
    .await;

// Receiving messages from the chatbox server
while let Some(server_packet) = client.next().await {
    println!("{:?}", server_packet);
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages