Обновить README.md
This commit is contained in:
parent
40afb802b2
commit
781b9779a2
1 changed files with 6 additions and 9 deletions
15
README.md
15
README.md
|
|
@ -1,13 +1,12 @@
|
||||||
# Rust Discord Activity
|
# Rust Discord Activity
|
||||||
_A lightweight Rust library to control Discord Rich Presence_
|
_A lightweight Rust library to control Discord Rich Presence_
|
||||||
|
|
||||||
[](https://crates.io/crates/rust-discord-activity)
|
[Author of the idea and 80% code](https://github.com/DylanCa/rust-discord-activity)
|
||||||
[](https://crates.io/crates/rust-discord-activity)
|
|
||||||
[](https://docs.rs/rust-discord-activity/latest)
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
Rust Discord Activity is available directly on [crates.io](https://crates.io/crates/rust-discord-activity):
|
```bash
|
||||||
`cargo add rust-discord-activity`
|
cargo add --git https://git.amok.dev/AmokDev/rust-discord-rpc
|
||||||
|
```
|
||||||
|
|
||||||
## How to use
|
## How to use
|
||||||
1. Instantiate a new DiscordClient
|
1. Instantiate a new DiscordClient
|
||||||
|
|
@ -15,8 +14,6 @@ Rust Discord Activity is available directly on [crates.io](https://crates.io/cra
|
||||||
3. Create a new Payload with your Activity
|
3. Create a new Payload with your Activity
|
||||||
4. Send your Payload through the DiscordClient
|
4. Send your Payload through the DiscordClient
|
||||||
|
|
||||||
Et voilà !
|
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
```rust
|
```rust
|
||||||
let mut client = DiscordClient::new("<application_id>");
|
let mut client = DiscordClient::new("<application_id>");
|
||||||
|
|
@ -52,9 +49,9 @@ let _ = client.send_payload(payload);
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
And voilà! This sets-up a new Activity for the current Discord user:
|
This sets-up a new Activity for the current Discord user:
|
||||||
|
|
||||||
<img alt="Discord Rich Presence" src="https://imgur.com/gf9pOen.png" width="300"/>
|
<img alt="Discord Rich Presence" src="https://imgur.com/gf9pOen.png" width="300"/>
|
||||||
|
|
||||||
## Limitations
|
## Limits
|
||||||
For the moment, the library only works with WINDOWS (suck UNIXoids 🖕) and local Discord application.
|
For the moment, the library only works with WINDOWS (suck UNIXoids 🖕) and local Discord application.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue