Coder Social home page Coder Social logo

giorgi-o / crossplatformplaying Goto Github PK

View Code? Open in Web Editor NEW
55.0 10.0 5.0 160 KB

BetterDiscord plugin that lets you see what your friends are playing even if they turned off game activity

JavaScript 100.00%
betterdiscord betterdiscord-plugin discord steam valorant league-of-legends epic-games origin ea

crossplatformplaying's Introduction

CrossPlatformPlaying

A BetterDiscord plugin that lets you see what your friends are playing even if they turned off game activity, and brings Rich Presence to games that don't support it.

illustration

CrossPlatformPlaying is a plugin that lets you see what your friends are playing, as well as any additional information available such as gamemode, score, map, etc.

Plugin broke due to the latest Discord update.

Most if not all plugins are affected, although this plugin is more than the others, since Discord restricted direct Node access to plugins, something which I relied on heavily via the net and tls modules.

TLDR: The plugin can't directly connect to Riot/Epic/etc anymore.

Yes, I'm working on it, but it'll take some time, since I'll need to refactor most of the code. The plugin won't auto-update, so you'll need to check back here every now and then.

Update: access the beta here

Currently supports

  • Valorant/League of Legends
  • Steam
  • Epic Games (Fortnite, Rocket League...)
  • EA (Apex, FIFA...)
  • Twitch
  • Hypixel

Installation

  • Download CrossPlatformPlaying.plugin.js and move it to your plugins folder.
  • If it asks you to install Zere's Plugin Library, click "Download Now" and once it finished installing, restart Discord using Ctrl+R.
  • Open BetterDiscord's plugin settings menu, enable CrossPlatformPlaying and click on the cog wheel to enable and configure the platforms you want to use.

Current status

This is my first time writing a BetterDiscord plugin, so any feedback and/or contributions are greatly appreciated, especially if this project is to support more platforms and games that I don't play or have the knowledge of how they work.

Feel free to DM me or ping me in the BetterDiscord server to give feedback or to ask any questions.

Future improvements:

  • Platform support:
    • Support for Steam Rich Presence (to show extra info in games that use Steam's RPC such as CS:GO)
    • Xbox Live (this is useful as it shows what people are playing on Xbox but also on PC via Game Bar)
    • Playstation
    • Battle.net/Uplay/Rockstar/GoG
    • Any other platform or game that lets you see what your friends are playing, theoretically
    • Apple Music (integrate it just like Spotify)
  • The Code
    • Make it modular to easily install/remove platforms
    • Improve the way the plugin injects the custom activities (doesn't currently update the member list)
  • See if your invisible friends are online (the plugin already has the data, I just need to figure out the best way to display online vs invisible vs offline)
  • Create a Wiki to document how my findings of how each platform works
  • Add guides on how to get the tokens/keys/cookies of each platform
  • Make the settings panel less ugly

Again, most of this is out of my reach, so any contribution is greatly appreciated.

crossplatformplaying's People

Contributors

giorgi-o avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

crossplatformplaying's Issues

Why isn't a simple check for a matching number of opening and closing "<>" & tags enough to detect chunked messages sent by riot's xmpp server?

Why isn't a simple check for a matching number of opening and closing "<>" then checking if the tags "openning closing" match, enough to detect chunked messages sent by riot's xmpp server, am I missing something regarding xml or anything else, if it's because it would fail if someone sent a message containing those elements, they are encoded as "<" & so on?

Any chance for Powercord (Replugged) support?

I tried using your plugin with bdCompat (compatibility layer for BetterDiscord plugins), but settings page is broken and it doesn't seem like the plugin is doing anything... (Edit: Plugin seems to load correctly, as it asks for the library and such, but after all those restarts, I don't see anything new in the rich presence of others ... although i couldn't get to settings tho so i don't know if there are some picked platforms)

So, any plans on porting the plugin to Powercord (currently Replugged)? Probably not...
But at least some form of support for the bdCompat would be great. This plugin seems really promising and super useful.

Is this how it's supposed to work?

Hi,

I'm wondering whether this is how the plugin is supposed to display what I'm playing while I'm running Rocket League on Steam.

Screenshot 2022-09-10 004231

Because it's nothing like yours.
Screenshot 2022-09-10 004750

error when launching discord

hey, I'm getting an error everytime i launch discord :
"
Error happened!
Your CrossPlatformPlaying config JSON is invalid!
Try putting it into an online JSON formatter to look for any errors.
TypeError: Cannot read property 'hasShownChangelog' of undefined"

Do you need to check for contained tags in riot's chunked xmpp messages?

the following code:
// check for tag inside itself eg <a><a></a></a> // this happens when you send a message to someone int containedTags = 0; int nextTagIndex = data.IndexOf($"<{firstTagName}", 1); while (nextTagIndex != -1 && nextTagIndex < closingTagIndex) { containedTags++; nextTagIndex = data.IndexOf($"<{ firstTagName}", nextTagIndex + 1); }
at

// check for tag inside itself eg <a><a></a></a>

is for checking for a tag inside itself, but is it really necessary, right now it seems that riot encodes '<' '>' inside a message as '&let;' & so on, am I missing something?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.