ebiten_rpc

package module
v0.0.0-...-0af98a9 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

README

ebitengine-discord-rpc

discord Rich Presence for Ebitengine

GitHub license GitHub go.mod Go version GitHub tag (latest SemVer) GoDoc Go Report Card

EbitenPot PotCore v1

Usage

Recommend to read this doc:
https://discord.com/developers/docs/rich-presence/how-to

1. Get a discord app

Here: https://discord.com/developers/applications

2. Get AppID

Click in your app, you'll find at the General information

3. Set some images and record ID (choice)

At .../rich-presence/assets, you'll find somewhere to add your image. Do not forget that you need to remember the IDs.

4. Use in Ebitengine game

See _example/README.md

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GameRPC

type GameRPC struct {
	AppID          string
	GameName       string
	State          string
	LargeImageID   string
	LargeImageText string
	SmallImageID   string
	SmallImageText string
	Party          *client.Party
	JoinID         string
	StartTime      time.Time
	Button         []*client.Button
	Secret         *client.Secrets
}

func NewGameRPC

func NewGameRPC(AppID string) *GameRPC

func (*GameRPC) AddButton

func (g *GameRPC) AddButton(Label, Url string) error

func (*GameRPC) AddSecret

func (g *GameRPC) AddSecret(Match, Join, Spectate string) error

func (*GameRPC) Start

func (g *GameRPC) Start() error

func (*GameRPC) Update

func (g *GameRPC) Update() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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