Skip to content

Discord Rich Presence "Playing GameTitle" instead "Playing Heroic Games Launcher" #5025

@butterbot6283

Description

@butterbot6283

Problem description

discord-rpc is outdated, please change it to @xhayper/discord-rpc and rewrite the code a bit

Feature description

show game title instead Heroic Games Launcher in status

Image

Alternatives

OR
For those who want to build themself, you can do this:
Go to

node_modules/discord-rpc/src

and add this to client.js

//needed
status_display_type: args.status_display_type, // 0=name, 1=state, 2=details

//extra
state_url: args.state_url,
details_url: args.details_url,
large_url: args.large_url,
small_url: args.small_url,

add to activity

return this.request(RPCCommands.SET_ACTIVITY, {
      pid,
      activity: {
        state: args.state,
        details: args.details,
        timestamps,
        assets,
        party,
        secrets,
        status_display_type: args.status_display_type,
        buttons: args.buttons,
        instance: !!args.instance,
      },
    });
  }

back to master and go

src/backend

add status_display_type: 2 in utils.ts

  client.updatePresence({
    details: title,
    instance: true,
    large_text: title,
    status_display_type: 2,
    startTimestamp: Date.now(),
    state: 'via Heroic on ' + getFormattedOsName(),
    ...overrides
  })
  logInfo('Started Discord Rich Presence', LogPrefix.Backend)
  return client
}

2 means showing details(gametitle) in status/member list

build and done

Image

Additional information

discord/discord-api-docs#7674

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestNew feature needs to be implemented.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions