rp

package module
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 30, 2022 License: ISC Imports: 2 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

rp Build Status

An implementation of Discord's rich presence for Linux, MacOS and Windows in Go. Fork of hugolgst/rich-go.

Disclaimer

This fork is not meant to be a replacement or a production-ready library. The sole purpose of this fork is opinionated changes to suit my own workflow with no gurantee for stablility.

Installation

Install github.com/fawni/rp:

$ go get -u github.com/fawni/rp

Usage

create a new client

c, err := rp.NewClient("DISCORD_APP_ID")
if err != nil {
	panic(err)
}

set the rich presence activity

if err := c.SetActivity(&rpc.Activity{
	State:      "Hey!",
	Details:    "Running on rp.go!",
	LargeImage: "largeimageid",
	LargeText:  "This is the large image",
	SmallImage: "smallimageid",
	SmallText:  "And this is the small image",
}) err != nil {
	panic(err)
}

more details in the example

License

ISC

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(ID string) (*rpc.Client, error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址