• Stars
    star
    121
  • Rank 287,152 (Top 6 %)
  • Language
    Go
  • License
    MIT License
  • Created about 6 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Discord Rich Presence implementation for Linux, macOS and Windows in Golang

rich-go Build Status

An implementation of Discord's rich presence in Golang for Linux, macOS and Windows

Installation

Install github.com/hugolgst/rich-go:

$ go get github.com/hugolgst/rich-go

Usage

First of all import rich-go

import "github.com/hugolgst/rich-go/client"

then login by sending the first handshake

err := client.Login("DISCORD_APP_ID")
if err != nil {
	panic(err)
}

and you can set the Rich Presence activity (parameters can be found :

err = client.SetActivity(client.Activity{
	State:      "Heyy!!!",
	Details:    "I'm running on rich-go :)",
	LargeImage: "largeimageid",
	LargeText:  "This is the large image :D",
	SmallImage: "smallimageid",
	SmallText:  "And this is the small image",
	Party: &client.Party{
		ID:         "-1",
		Players:    15,
		MaxPlayers: 24,
	},
	Timestamps: &client.Timestamps{
		Start: time.Now(),
	},
})

if err != nil {
	panic(err)
}

More details in the example

Contributing

  1. Fork it (https://github.com/hugolgst/rich-go/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

More Repositories

1

nixos-raspberry-pi-cluster

A user-guide to create a Raspberry Pi (3B+, 4) cluster under NixOS and managed by NixOps
Nix
86
star
2

digart

Generating visualisations for ฯ€, e, ฮฆ in pure Golang made for ฯ€-day 2020. Usable in the web with WebAssembly.
Go
72
star
3

ikea-sharp

๐Ÿ“ฆThe new groundbreaking programming language
Go
57
star
4

pine-database

[archive] ๐Ÿ“œ pine-database is an intelligent MySQL database library in Java.
Java
19
star
5

ruby-codegolf

Ruby tips to win in every code-golf challenge
13
star
6

rich-crystal

๐Ÿ“‡a simple Crystal extension for Discord Rich Presence
Crystal
8
star
7

old-dotfiles

[archive] everything is said in the name
Shell
4
star
8

tictactoe

TicTacToe game built with the MinMax algorithm
Ruby
4
star
9

gruvbox-rubymine

๐ŸŒˆ gruvbox dark color scheme for JetBrains RubyMine
3
star
10

mood-prediction

Machine Learning PoC to predict the mood of a user each day.
Jupyter Notebook
3
star
11

homeccenture

Homeccenture enlightens your home-office experience. Accenture STARTHack 2021 Winner project
Jupyter Notebook
3
star
12

hue-rb

๐Ÿ–ฅ Hue adaptation to Ruby
Ruby
2
star
13

.files

my dotfiles
Vim Script
2
star
14

nixos-wireguard

Wireguard server on a Google Cloud VM running NixOS
Nix
1
star
15

term-art

๐Ÿ“Š A terminal boards using ascii art
Ruby
1
star
16

voronoi-infinite-map

prototype of an infinite Voronoi map using leaflet
TypeScript
1
star
17

react-template

My personal React template (TypeScript, ChakraUI & NextJS)
TypeScript
1
star
18

baccalaureat-scientifique

๐Ÿ‘จโ€๐ŸŽ“Mes rรฉvisions pour le baccalaurรฉat scientifique
TeX
1
star
19

home.cern

Redesign of the CERN landing page.
JavaScript
1
star