https://github.com/hugolgst/rich-crystal
📇a simple Crystal extension for Discord Rich Presence
https://github.com/hugolgst/rich-crystal
crystal discord rich-presence
Last synced: 26 days ago
JSON representation
📇a simple Crystal extension for Discord Rich Presence
- Host: GitHub
- URL: https://github.com/hugolgst/rich-crystal
- Owner: hugolgst
- License: mit
- Created: 2018-05-22T19:30:13.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-03-19T17:33:54.000Z (about 5 years ago)
- Last Synced: 2025-03-30T03:02:48.389Z (about 2 months ago)
- Topics: crystal, discord, rich-presence
- Language: Crystal
- Homepage:
- Size: 11.7 KB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rich-crystal 
Crystal extension for Discord Rich Presence
## Installation
Add this to your application's `shard.yml`:
```yml
dependencies:
rich-crystal:
github: hugolgst/rich-crystal
```## Usage
You must create a Client with your Discord Rich Presence application id :
```crystal
client = RichCrystal::Client.new(174839413294239_u64)
```Then by calling login you send the first handshake :
```crystal
client.login
```And you can set the Rich Presence activity (parameters can be found [here](https://github.com/discordapp/discord-rpc/blob/master/documentation/hard-mode.md#new-rpc-command) :
```crystal
client.activity({
state => "Running on Crystal",
details => "Heyyyy",
})
```## Contributing
1. Fork it (https://github.com/hugolgst/rich-crystal/fork)
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')
4. Push to the branch (git push origin my-new-feature)
5. Create a new Pull Request## Contributors
- [hugolgst](https://github.com/hugolgst) - creator, maintainer