Giter Club home page Giter Club logo

valorant-xmpp-client's Introduction

Unofficial Valorant XMPP Client

This project is not endorsed or sponsored by Riot Games in any way. It simply an unofficial library that uses xmpp to communicate with Riot's official servers.

info

this readme is a draft because I promised a test version

no npm release for this version as it is incomplete and I wouldn't even consider it alpha

building

Copy the project

$ git clone https://github.com/ev3nvy/valorant-xmpp-client.git

Install dependencies

$ npm i

Start typescript compilation

$ npm run build

Make it globally available on your system

$ npm link

To use it in another project

$ npm link valorant-xmpp-client

examples

single user - javascript
const { Builders, ValorantXmppClient } = require('valorant-xmpp-client');

const { PresenceBuilder, KeystonePresenceBuilder, ValorantPresenceBuilder } = Builders;

const xmppClient = new ValorantXmppClient();

xmppClient.presence = new PresenceBuilder()
    .addKeystonePresence(new KeystonePresenceBuilder())
    .addValorantPresence(new ValorantPresenceBuilder());

xmppClient.once('ready', () => {
    console.log('ready');
});

xmppClient.on('presence', (data) => {
    console.log(data);
});

xmppClient.on('error', (error) => {
    console.log(error);
});

// xmppClient.login({ username: '', password: '' });
// xmppClient.login({ accessToken: '' });
xmppClient.login({ ssidCookie: '' });
single user - typescript
import { Builders, ValorantXmppClient } from 'valorant-xmpp-client';

const { PresenceBuilder, KeystonePresenceBuilder, ValorantPresenceBuilder } = Builders;

const xmppClient = new ValorantXmppClient();

xmppClient.presence = new PresenceBuilder()
    .addKeystonePresence(new KeystonePresenceBuilder())
    .addValorantPresence(new ValorantPresenceBuilder());

xmppClient.once('ready', () => {
    console.log('ready');
});

xmppClient.on('presence', (data) => {
    console.log(data);
});

xmppClient.on('error', (error) => {
    console.log(error);
});

// xmppClient.login({ username: '', password: '' });
// xmppClient.login({ accessToken: '' });
xmppClient.login({ ssidCookie: '' });

Contributing

open an issue or a pull request, you can also dm me at ev3nvy#9996 on Discord

Acknowledgements

narkdev for the initial implementation in C#

giorgi-o for the amazing documentation

...and other amazing people at https://discord.gg/a9yzrw3KAm

Legal

Unofficial Valorant XMPP Client was created under Riot Games' "Legal Jibber Jabber" policy using assets owned by Riot Games. Riot Games does not endorse or sponsor this project.

This project is published under the MIT license. See the LICENSE file in the root directory.

valorant-xmpp-client's People

Contributors

ev3nvy avatar

Stargazers

 avatar  avatar Amine avatar FRFlo avatar  avatar paul avatar Techdoodle avatar KumKaShree avatar Seven317 avatar Nobody avatar WatchAndyTW avatar  avatar Arnaldo avatar windowsed avatar Gabriel Fontán avatar Žan avatar Jakkaphat Chalermphanaphan avatar Inxpired avatar Amr Ramadan avatar

Watchers

 avatar

valorant-xmpp-client's Issues

XMPP Client stops working after an error

Even when I use the callback for the error event, I don't receive anymore presence event updates after the error.

This is the error

TypeError: Cannot read properties of undefined (reading 'split')
    at parseJid (D:\client_projects\valorant-xmpp-client\built\helpers\parsers.js:6:46)
    at formatRosterInfo (D:\client_projects\valorant-xmpp-client\built\client\friends\friends.js:7:43)
    at D:\client_projects\valorant-xmpp-client\built\client\friends\friends.js:18:29
    at Array.map (<anonymous>)
    at parseRosterInfo (D:\client_projects\valorant-xmpp-client\built\client\friends\friends.js:18:15)
    at formatRoster (D:\client_projects\valorant-xmpp-client\built\client\friends\friends.js:28:60)
    at ValorantXmppClient._mainLoop (D:\client_projects\valorant-xmpp-client\built\client\valorant-xmpp.js:86:71)     
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
Emitted 'error' event on ValorantXmppClient instance at:
    at ValorantXmppClient._mainLoop (D:\client_projects\valorant-xmpp-client\built\client\valorant-xmpp.js:112:18)    
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

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.