Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var items = document.getElementsByClassName("hlist games game-cards")[0];
- var popularGames = [];
- var token = prompt("Please enter your Discord token");
- var promote = function (placeId, playerCount) {
- var http = new XMLHttpRequest();
- http.open('POST', 'https://discordapp.com/api/channels/254749223143211010/messages');
- http.setRequestHeader("Content-type", "application/json");
- http.setRequestHeader("authorization", token);
- http.send('{"content":"pls join this roblox place that i made, id: ' + placeId + ' playing: ' + playerCount + ' join !!"}');
- }
- if (token.indexOf('.') < 5)
- alert("Invalid token. Please run the script again");
- else {
- var ws = new WebSocket("wss://gateway.discord.gg/?v=5&encoding=json");
- var seq = null;
- ws.onmessage = function (r) {
- var e = JSON.parse(r.data);
- if (typeof (e.s) != 'undefined' && e.s != null)
- seq = e.s;
- if (e.op == 10) {
- setInterval(function () {
- ws.send(JSON.stringify({
- "op": 1,
- "d": seq
- }));
- }, e.d.heartbeat_interval);
- ws.send(JSON.stringify({
- "op": 2,
- "d": {
- "token": token,
- "properties": {
- "$os": "linux",
- "$browser": "discord.py",
- "$device": "discord.py",
- "$referrer": "",
- "$referring_domain": ""
- },
- "compress": true,
- "large_threshold": 250,
- "v": 3
- }
- }));
- }
- if (e.t == "MESSAGE_CREATE") {
- console.log("message created");
- if (e.d.channel_id.toString() == "254749223143211010") {
- console.log("in #chat (" + e.d.content + ") and " + e.d.content.startsWith('pls join this roblox place that i made, id: '));
- if (e.d.content.startsWith('pls join this roblox place that i made, id: ')) {
- var contentData = e.d.content.split(' ');
- var placeId = parseInt(contentData[9]);
- var playerCount = parseInt(contentData[11]);
- $.get("https://www.roblox.com/place-thumbnails?params=%5B%7BplaceId:" + placeId + "%7D%5D", function (response) {
- var placeData = response[0];
- items.innerHTML = atob('PGxpIGNsYXNzPSJsaXN0LWl0ZW0gZ2FtZS1jYXJkIj4NCiAgICA8ZGl2IGNsYXNzPSJnYW1lLWNhcmQtY29udGFpbmVyIj4NCiAgICAgICAgPGEgaHJlZj0iJUdBTU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m90ZXMiPjwvZGl2Pg0KICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0idm90ZS1wZXJjZW50YWdlIiBzdHlsZT0id2lkdGg6IDkzJTsiPjwvZGl2Pg0KICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0idm90ZS1tYXNrIj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJzZWdtZW50IHNlZy0xIj48L2Rpdj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJzZWdtZW50IHNlZy0yIj48L2Rpdj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJzZWdtZW50IHNlZy0zIj48L2Rpdj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJzZWdtZW50IHNlZy00Ij48L2Rpdj4NCiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0idm90ZS10aHVtYnMtZG93biI+DQogICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz0iaWNvbi10aHVtYnMtZG93biI+PC9zcGFuPg0KICAgICAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJ2b3RlLWNvdW50cyI+DQogICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InZvdGUtZG93bi1jb3VudCI+MTgsODMwPC9kaXY+DQogICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InZvdGUtdXAtY291bnQiPjI1OSw3Mjg8L2Rpdj4NCiAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICA8L2E+DQogICAgPC9kaXY+DQo8L2xpPg==')
- .replace(/%GAMEURL%/g, placeData.url)
- .replace(/%GAMETHUMB%/g, placeData.thumbnailUrl)
- .replace(/%GAMETITLE%/g, placeData.name)
- .replace(/%PLAYING%/g, playerCount.toLocaleString())
- + items.innerHTML;
- });
- }
- }
- }
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement