library: rpc: return nonce in SetActivity function
There's currently no way to obtain that value, so it is returned here to help with tinkering with the RPC server in the Discord client. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
parent
b3325f56b1
commit
802ad250ca
@ -62,9 +62,9 @@ type activityArgs struct {
|
||||
Activity *Activity `json:"activity"`
|
||||
}
|
||||
|
||||
func (d *Client) SetActivity(act *Activity) error {
|
||||
func (d *Client) SetActivity(act *Activity) (string, error) {
|
||||
if err := d.activate(); err != nil {
|
||||
return err
|
||||
return "", err
|
||||
}
|
||||
|
||||
nonce := uuid.New().String()
|
||||
@ -80,5 +80,5 @@ func (d *Client) SetActivity(act *Activity) error {
|
||||
Nonce: nonce,
|
||||
},
|
||||
})
|
||||
return err
|
||||
return nonce, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user