Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eludris-community/eludrs
A simple asynchronous Eludris API wrapper made in rust
https://github.com/eludris-community/eludrs
Last synced: about 2 months ago
JSON representation
A simple asynchronous Eludris API wrapper made in rust
- Host: GitHub
- URL: https://github.com/eludris-community/eludrs
- Owner: eludris-community
- Created: 2022-11-17T18:35:15.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-23T22:18:19.000Z (5 months ago)
- Last Synced: 2024-04-23T23:48:02.018Z (5 months ago)
- Language: Rust
- Homepage:
- Size: 45.9 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Eludrs
A simple asynchronous wrapper for the Eludris API
## Installation
Just run the following command:
```sh
cargo add --git eludrs
```## Example
While an API wrapper has many uses, here's an example of what most people will
end up using this for, making Bots:```rust
use eludrs::HttpClient;
use futures::stream::StreamExt;#[tokio::main]
async fn main() {
let mut http = HttpClient::new().name("Uwuki".to_string());
let gateway = http.create_gateway.await?;
let mut events = gateway.get_events().await.unwrap();while let Some(msg) = events.next().await {
if msg.content == "!ping" {
http.send("Pong").await.unwrap();
}
}
}
```## Docs
If you want documentation you can currently get that by going to your project
and running```sh
cargo doc -p eludrs --open
```