This crate provides a way to interact with [Twitch]'s chat.
Along with parse messages as Rust types, it provides methods for sending messages.
It also provides an 'event' loop which you can use to make a bot.
By default, this crate depends on zero external crates -- but it makes it rather limited in scope. It can just parse/decode/encode to standard trait types (std::io::{Read, Write}
).
To use the AsyncRunner
(an async-event loop) you must able the async
feature.
NOTE This is a breaking change from 0.12
which had the async stuff enabled by default.
toml
twitchchat = { version = "0.13", features = ["async"] }
To use a specific TcpStream
/TlStream
refer to the runtime table below.
To enable serde support, simply enable the optional serde
feature
This crate is runtime agonostic. To use..
| Read/Write provider | Features |
| --- | --- |
| async_io
|async-io
|
| smol
|smol
|
| async_std
|async-std
|
| tokio
|tokio
and tokio-util
|
If you want TLS supports, enable the above runtime and also enable the cooresponding features:
| Read/Write provider | Runtime | Features | TLS backend |
| --- | --- | --- | --- |
| async_io
| async_io
| "async-tls"
| rustls
|
| smol
| smol
| "async-tls"
| rustls
|
| async_std
| async_std
| "async-tls"
| rustls
|
| tokio
| tokio
| "tokio-util"
, "tokio-rustls"
, "webpki-roots"
| rustls
|
| tokio
| tokio
| "tokio-util"
, "tokio-native-tls"
, "native-tls"
| native-tls
|
twitchchat
is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See LICENSE-APACHE
and LICENSE-MIT
for details.