From 2fbe86293358d7bb7181f100340201ce233e99c5 Mon Sep 17 00:00:00 2001 From: Alexei Stukov Date: Sun, 30 Apr 2017 05:34:52 +0300 Subject: [PATCH] Invite code joining --- js/main.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/main.js b/js/main.js index 2cada83a..b1eae799 100644 --- a/js/main.js +++ b/js/main.js @@ -4310,11 +4310,13 @@ class V2C_PublicServers extends BDV2.reactComponent { 'loading': true }); - if (server.pinned) { + if (server.nativejoin) { self.setState({ 'loading': false }); - console.log("PINNED!"); + $(".guilds-add").click(); + $(".join .btn-primary").click(); + $(".join-server input").val(server.invitecode); return; } @@ -4360,7 +4362,7 @@ class V2C_PublicServers extends BDV2.reactComponent { "identifier": "86004744966914048", "icon": "https://cdn.discordapp.com/icons/86004744966914048/c8d49dc02248e1f55caeb897c3e1a26e.png", "nativejoin": true, - "inviteid": "0Tmfo5ZbORCRqbAd", + "invitecode": "0Tmfo5ZbORCRqbAd", "pinned": true }; return BDV2.react.createElement(V2Components.ServerCard, { server: server, pinned: true, join: this.join });