Files
discord.js/web-dist/discord.min.3.9.0.js
2015-10-25 19:41:40 +00:00

3 lines
72 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.Discord=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(b,c){d(this,a);this.type=b.type,this.id=b.id,"member"===this.type?this.packed=c.server.getMember("id",b.id).evalPerms.packed:this.packed=c.server.getRole(b.id).packed,this.packed=this.packed&~b.deny,this.packed=this.packed|b.allow,this.deny=b.deny,this.allow=b.allow}return a.prototype.getBit=function(a){return 1===(this.packed>>>a&1)},a.prototype.setBit=function(){},e(a,[{key:"createInstantInvite",get:function(){return this.getBit(0)},set:function(a){this.setBit(0,a)}},{key:"manageRoles",get:function(){return this.getBit(3)},set:function(a){this.setBit(3,a)}},{key:"manageChannels",get:function(){return this.getBit(4)},set:function(a){this.setBit(4,a)}},{key:"readMessages",get:function(){return this.getBit(10)},set:function(a){this.setBit(10,a)}},{key:"sendMessages",get:function(){return this.getBit(11)},set:function(a){this.setBit(11,a)}},{key:"sendTTSMessages",get:function(){return this.getBit(12)},set:function(a){this.setBit(12,a)}},{key:"manageMessages",get:function(){return this.getBit(13)},set:function(a){this.setBit(13,a)}},{key:"embedLinks",get:function(){return this.getBit(14)},set:function(a){this.setBit(14,a)}},{key:"attachFiles",get:function(){return this.getBit(15)},set:function(a){this.setBit(15,a)}},{key:"readMessageHistory",get:function(){return this.getBit(16)},set:function(a){this.setBit(16,a)}},{key:"mentionEveryone",get:function(){return this.getBit(17)},set:function(a){this.setBit(17,a)}},{key:"voiceConnect",get:function(){return this.getBit(20)},set:function(a){this.setBit(20,a)}},{key:"voiceSpeak",get:function(){return this.getBit(21)},set:function(a){this.setBit(21,a)}},{key:"voiceMuteMembers",get:function(){return this.getBit(22)},set:function(a){this.setBit(22,a)}},{key:"voiceDeafenMembers",get:function(){return this.getBit(23)},set:function(a){this.setBit(23,a)}},{key:"voiceMoveMembers",get:function(){return this.getBit(24)},set:function(a){this.setBit(24,a)}},{key:"voiceUseVoiceActivation",get:function(){return this.getBit(25)},set:function(a){this.setBit(25,a)}}]),a}();b.exports=f},{}],2:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=a("./Endpoints.js"),g=a("./user.js"),h=a("./server.js"),i=a("./channel.js"),j=a("./message.js"),k=a("./invite.js"),l=a("./PMChannel.js"),m=a("../ref/gameMap.json"),n=a("superagent"),o=a("ws"),p=a("fs"),q={queue:!1},r=function(){function a(){var b=arguments.length<=0||void 0===arguments[0]?q:arguments[0],c=arguments.length<=1||void 0===arguments[1]?void 0:arguments[1];d(this,a),this.options=b,this.options.queue=this.options.queue,this.token=c,this.state=0,this.websocket=null,this.events={},this.user=null,this.alreadySentData=!1,this.serverCreateListener={},this.typingIntervals={},this.email="abc",this.password="abc",this.userCache=[],this.channelCache=[],this.serverCache=[],this.pmChannelCache=[],this.readyTime=null,this.checkingQueue={},this.userTypingListener={},this.queue={},this.__idleTime=null,this.__gameId=null}return a.prototype.sendPacket=function(a){1===this.websocket.readyState&&this.websocket.send(JSON.stringify(a))},a.prototype.debug=function(a){this.trigger("debug",a)},a.prototype.on=function(a,b){this.events[a]=b},a.prototype.off=function(a){this.events[a]=null},a.prototype.keepAlive=function(){this.debug("keep alive triggered"),this.sendPacket({op:1,d:Date.now()})},a.prototype.trigger=function(a){var b=[];for(var c in arguments)b.push(arguments[c]);var d=this.events[a];d&&d.apply(this,b.slice(1))},a.prototype.login=function(){var a=arguments.length<=0||void 0===arguments[0]?"foo@bar.com":arguments[0],b=arguments.length<=1||void 0===arguments[1]?"pass1234":arguments[1],c=arguments.length<=2||void 0===arguments[2]?function(a,b){}:arguments[2],d=this;return new Promise(function(e,g){0===d.state||4===d.state?(d.state=1,d.email=a,d.password=b,n.post(f.LOGIN).send({email:a,password:b}).end(function(a,b){a?(d.state=4,d.trigger("disconnected"),d.websocket&&d.websocket.close(),c(a),g(a)):(d.state=2,d.token=b.body.token,d.getGateway().then(function(a){d.createws(a),c(null,d.token),e(d.token)})["catch"](function(a){c(a),g(a)}))})):g(new Error("Client already logging in or ready"))})},a.prototype.logout=function(){var a=arguments.length<=0||void 0===arguments[0]?function(a){}:arguments[0],b=this;return new Promise(function(c,d){n.post(f.LOGOUT).set("authorization",b.token).end(function(e,f){e?(a(e),d(e)):(b.websocket.close(),b.state=4,a(),c())})})},a.prototype.createServer=function(a,b){var c=arguments.length<=2||void 0===arguments[2]?function(a,b){}:arguments[2],d=this;return new Promise(function(e,g){n.post(f.SERVERS).set("authorization",d.token).send({name:a,region:b}).end(function(a,b){a?(c(a),g(a)):d.serverCreateListener[b.body.id]=[e,c]})})},a.prototype.createChannel=function(a,b,c){var d=arguments.length<=3||void 0===arguments[3]?function(a,b){}:arguments[3],e=this;return new Promise(function(g,h){n.post(f.SERVERS+"/"+e.resolveServerID(a)+"/channels").set("authorization",e.token).send({name:b,type:c}).end(function(a,b){if(a)d(a),h(a);else{var c=e.getServer("id",b.body.guild_id),f=e.addChannel(b.body,b.body.guild_id);c.addChannel(f),d(null,f),g(f)}})})},a.prototype.leaveServer=function(a){var b=arguments.length<=1||void 0===arguments[1]?function(a,b){}:arguments[1],c=this;return new Promise(function(d,e){n.del(f.SERVERS+"/"+c.resolveServerID(a)).set("authorization",c.token).end(function(f,g){f?(b(f),e(f)):(c.serverCache.splice(c.serverCache.indexOf(a),1),b(null),d())})})},a.prototype.createInvite=function(a,b){var c=arguments.length<=2||void 0===arguments[2]?function(a,b){}:arguments[2],d=this;return new Promise(function(e,g){var j;j=a instanceof h?a.id:a instanceof i?a.id:a,b=b||{},b.max_age=b.maxAge||0,b.max_uses=b.maxUses||0,b.temporary=b.temporary||!1,b.xkcdpass=b.xkcd||!1,n.post(f.CHANNELS+"/"+j+"/invites").set("authorization",d.token).send(b).end(function(a,b){if(a)c(a),g(a);else{var f=new k(b.body,d);c(null,f),e(f)}})})},a.prototype.startPM=function(a){var b=this;return new Promise(function(c,d){var e=a;a instanceof g&&(e=a.id),n.post(f.USERS+"/"+b.user.id+"/channels").set("authorization",b.token).send({recipient_id:e}).end(function(a,e){a?d(a):c(b.addPMChannel(e.body))})})},a.prototype.reply=function(a,b,c){var d=arguments.length<=3||void 0===arguments[3]?function(a,b){}:arguments[3],e=this;return new Promise(function(f,g){"function"==typeof c&&(d=c,c=!1);var h=a.sender;e.sendMessage(a,b,c,d,h+", ").then(f)["catch"](g)})},a.prototype.deleteMessage=function(a,b){var c=arguments.length<=2||void 0===arguments[2]?function(a,b){}:arguments[2],d=this;return new Promise(function(e,g){function h(){n.del(f.CHANNELS+"/"+a.channel.id+"/messages/"+a.id).set("authorization",d.token).end(function(a,b){a?j():i()})}function i(){c(),e()}function j(a){c(a),g(a)}b?setTimeout(h,b):h()})},a.prototype.updateMessage=function(a,b){var c=arguments.length<=2||void 0===arguments[2]?function(a,b){}:arguments[2],d=this,e=new Promise(function(f,g){function h(a){e.message=a,c(null,a),f(a)}function i(a){e.error=a,c(a),g(a)}b=b instanceof Array?b.join("\n"):b,d.options.queue?(d.queue[a.channel.id]||(d.queue[a.channel.id]=[]),d.queue[a.channel.id].push({action:"updateMessage",message:a,content:b,then:h,error:i}),d.checkQueue(a.channel.id)):d._updateMessage(a,b).then(h)["catch"](i)});return e},a.prototype.setUsername=function(a){var b=arguments.length<=1||void 0===arguments[1]?function(a){}:arguments[1],c=this;return new Promise(function(d,e){n.patch(f.API+"/users/@me").set("authorization",c.token).send({avatar:c.user.avatar,email:c.email,new_password:null,password:c.password,username:a}).end(function(a){b(a),a?e(a):d()})})},a.prototype.getChannelLogs=function(a){var b=arguments.length<=1||void 0===arguments[1]?500:arguments[1],c=arguments.length<=2||void 0===arguments[2]?function(a,b){}:arguments[2],d=this;return new Promise(function(e,g){var h=a;a instanceof i&&(h=a.id),n.get(f.CHANNELS+"/"+h+"/messages?limit="+b).set("authorization",d.token).end(function(a,b){if(a)c(a),g(a);else{for(var f=[],i=d.getChannel("id",h),k=b.body,l=Array.isArray(k),m=0,k=l?k:k[Symbol.iterator]();;){var n;if(l){if(m>=k.length)break;n=k[m++]}else{if(m=k.next(),m.done)break;n=m.value}for(var o=n,p=[],q=o.mentions,r=Array.isArray(q),s=0,q=r?q:q[Symbol.iterator]();;){var t;if(r){if(s>=q.length)break;t=q[s++]}else{if(s=q.next(),s.done)break;t=s.value}var u=t;p.push(d.addUser(u))}var v=d.addUser(o.author);f.push(new j(o,i,p,v))}c(null,f),e(f)}})})},a.prototype.deleteChannel=function(a){var b=arguments.length<=1||void 0===arguments[1]?function(a){}:arguments[1],c=this;return new Promise(function(d,e){var g=a;a instanceof i&&(g=a.id),n.del(f.CHANNELS+"/"+g).set("authorization",c.token).end(function(a){a?(b(a),e(a)):(b(null),d())})})},a.prototype.joinServer=function(a){var b=arguments.length<=1||void 0===arguments[1]?function(a,b){}:arguments[1],c=this;return new Promise(function(d,e){var g=a instanceof k?a.code:a;n.post(f.API+"/invite/"+g).set("authorization",c.token).end(function(a,f){a?(b(a),e(a)):c.getServer("id",f.body.guild.id)?d(c.getServer("id",f.body.guild.id)):c.serverCreateListener[f.body.guild.id]=[d,b]})})},a.prototype.sendFile=function(a,b){var c=arguments.length<=2||void 0===arguments[2]?"image.png":arguments[2],d=arguments.length<=3||void 0===arguments[3]?function(a,b){}:arguments[3],e=this,f=new Promise(function(g,h){function i(a){e.options.queue?(e.queue[a]||(e.queue[a]=[]),e.queue[a].push({action:"sendFile",attachment:l,attachmentName:c,then:j,error:k}),e.checkQueue(a)):e._sendFile(a,l,c).then(j)["catch"](k)}function j(a){f.message=a,d(null,a),g(a)}function k(a){f.error=a,d(a),h(a)}var l;"string"==typeof b||b instanceof String?(l=p.createReadStream(b),c=b):l=b,e.resolveDestination(a).then(i)["catch"](k)});return f},a.prototype.sendMessage=function(a,b,c){var d=arguments.length<=3||void 0===arguments[3]?function(a,b){}:arguments[3],e=arguments.length<=4||void 0===arguments[4]?"":arguments[4],f=this,g=new Promise(function(h,i){function j(a){d(a),i(a)}function k(a){f.options.queue?(f.queue[a]||(f.queue[a]=[]),f.queue[a].push({action:"sendMessage",content:b,mentions:p,tts:!!c,then:l,error:m}),f.checkQueue(a)):f._sendMessage(a,b,c,p).then(l)["catch"](m)}function l(a){g.message=a,d(null,a),h(a)}function m(a){g.error=a,d(a),i(a)}function n(){var a=b;return b instanceof Array&&(a=b.join("\n")),a}function o(){for(var a=[],c=b.match(/<@[^>]*>/g)||[],d=Array.isArray(c),e=0,c=d?c:c[Symbol.iterator]();;){var f;if(d){if(e>=c.length)break;f=c[e++]}else{if(e=c.next(),e.done)break;f=e.value}var g=f;a.push(g.substring(2,g.length-1))}return a}"function"==typeof c&&(d=c,c=!1),b=e+n(b);var p=o();f.resolveDestination(a).then(k)["catch"](j)});return g},a.prototype.createws=function(a){if(this.websocket)return!1;var b=this;this.websocket=new o(a),this.websocket.onopen=function(){b.trySendConnData()},this.websocket.onclose=function(){b.trigger("disconnected")},this.websocket.onmessage=function(a){var c=!1,d={};try{c=JSON.parse(a.data),d=c.d}catch(e){return void b.trigger("error",e,a)}switch(b.trigger("raw",c),c.t){case"READY":b.debug("received ready packet"),b.user=b.addUser(d.user);for(var f=d.guilds,h=Array.isArray(f),k=0,f=h?f:f[Symbol.iterator]();;){var l;if(h){if(k>=f.length)break;l=f[k++]}else{if(k=f.next(),k.done)break;l=k.value}var m=l,n=b.addServer(m)}for(var o=d.private_channels,p=Array.isArray(o),q=0,o=p?o:o[Symbol.iterator]();;){var r;if(p){if(q>=o.length)break;r=o[q++]}else{if(q=o.next(),q.done)break;r=q.value}var s=r;b.addPMChannel(s)}b.trigger("ready"),b.readyTime=Date.now(),b.debug("cached "+b.serverCache.length+" servers, "+b.channelCache.length+" channels, "+b.pmChannelCache.length+" PMs and "+b.userCache.length+" users."),b.state=3,setInterval(function(){b.keepAlive.apply(b)},d.heartbeat_interval);break;case"MESSAGE_CREATE":b.debug("received message");var t=[];d.mentions=d.mentions||[];for(var u=d.mentions,v=Array.isArray(u),w=0,u=v?u:u[Symbol.iterator]();;){var x;if(v){if(w>=u.length)break;x=u[w++]}else{if(w=u.next(),w.done)break;x=w.value}var y=x;t.push(b.addUser(y))}var z=b.getChannel("id",d.channel_id);if(z){var A=z.addMessage(new j(d,z,t,b.addUser(d.author)));b.trigger("message",A)}break;case"MESSAGE_DELETE":b.debug("message deleted");var z=b.getChannel("id",d.channel_id),B=z.getMessage("id",d.id);B?(b.trigger("messageDelete",z,B),z.messages.splice(z.messages.indexOf(B),1)):b.trigger("messageDelete",z);break;case"MESSAGE_UPDATE":b.debug("message updated");var z=b.getChannel("id",d.channel_id),C=z.getMessage("id",d.id);if(C){var D={};for(var E in C)D[E]=C[E];for(var E in d)D[E]=d[E];for(var t=[],F=D.mentions,G=Array.isArray(F),H=0,F=G?F:F[Symbol.iterator]();;){var I;if(G){if(H>=F.length)break;I=F[H++]}else{if(H=F.next(),H.done)break;I=H.value}var y=I;t.push(b.addUser(y))}var J=new j(D,z,t,C.author);b.trigger("messageUpdate",J,C),z.messages[z.messages.indexOf(C)]=J}break;case"GUILD_DELETE":var n=b.getServer("id",d.id);n&&(b.serverCache.splice(b.serverCache.indexOf(n),1),b.trigger("serverDelete",n));break;case"CHANNEL_DELETE":var z=b.getChannel("id",d.id);if(z){var n=z.server;n&&n.channels.splice(n.channels.indexOf(z),1),b.trigger("channelDelete",z),b.serverCache.splice(b.serverCache.indexOf(z),1)}break;case"GUILD_CREATE":var n=b.getServer("id",d.id);if(n||(n=b.addServer(d)),b.serverCreateListener[d.id]){var K=b.serverCreateListener[d.id];K[0](n),K[1](null,n),b.serverCreateListener[d.id]=null}b.trigger("serverCreate",n);break;case"CHANNEL_CREATE":var z=b.getChannel("id",d.id);if(!z){var L;L=d.is_private?b.addPMChannel(d):b.addChannel(d,d.guild_id);var M=b.getServer("id",d.guild_id);M&&M.addChannel(L),b.trigger("channelCreate",L)}break;case"GUILD_MEMBER_ADD":var n=b.getServer("id",d.guild_id);if(n){var N=b.addUser(d.user);b.trigger("serverNewMember",n.addMember(N,d.roles),n)}break;case"GUILD_MEMBER_REMOVE":var n=b.getServer("id",d.guild_id);if(n){var N=b.addUser(d.user);n.removeMember("id",N.id),b.trigger("serverRemoveMember",N,n)}break;case"USER_UPDATE":if(b.user&&d.id===b.user.id){var O=new g(d);b.trigger("userUpdate",O,b.user),~b.userCache.indexOf(b.user)&&(b.userCache[b.userCache.indexOf(b.user)]=O),b.user=O}break;case"PRESENCE_UPDATE":var P=b.getUser("id",d.user.id);if(P){d.user.username=d.user.username||P.username,d.user.id=d.user.id||P.id,d.user.discriminator=d.user.discriminator||P.discriminator,d.user.avatar=d.user.avatar||P.avatar;var Q=new g(d.user);Q.equalsStrict(P)?(b.trigger("presence",{user:P,oldStatus:P.status,status:d.status,server:b.getServer("id",d.guild_id),gameId:d.game_id}),P.status=d.status,P.gameId=d.game_id):(b.userCache[b.userCache.indexOf(P)]=Q,b.trigger("userUpdate",P,Q))}break;case"CHANNEL_UPDATE":var R=b.getChannel("id",d.id),S=b.getServer("id",d.guild_id);if(R&&S){var T=new i(d,S);T.messages=R.messages,b.trigger("channelUpdate",R,T),b.channelCache[b.channelCache.indexOf(R)]=T}break;case"TYPING_START":var P=b.getUser("id",d.user_id),R=b.getChannel("id",d.channel_id);b.userTypingListener[d.user_id]&&-1!==b.userTypingListener[d.user_id]||b.trigger("startTyping",P,R),b.userTypingListener[d.user_id]=Date.now(),setTimeout(function(){-1!==b.userTypingListener[d.user_id]&&Date.now()-b.userTypingListener[d.user_id]>6e3&&(b.trigger("stopTyping",P,R),b.userTypingListener[d.user_id]=-1)},6e3);break;case"GUILD_ROLE_DELETE":var n=b.getServer("id",d.guild_id),U=n.getRole(d.role_id);b.trigger("serverRoleDelete",n,U),n.removeRole(U.id);break;case"GUILD_ROLE_UPDATE":var n=b.getServer("id",d.guild_id),U=n.getRole(d.role.id),V=n.updateRole(d.role);b.trigger("serverRoleUpdate",n,U,V);break;default:b.debug("received unknown packet"),b.trigger("unknown",c)}}},a.prototype.addUser=function(a){return this.getUser("id",a.id)||this.userCache.push(new g(a)),this.getUser("id",a.id)},a.prototype.addChannel=function(a,b){return this.getChannel("id",a.id)||this.channelCache.push(new i(a,this.getServer("id",b))),this.getChannel("id",a.id)},a.prototype.addPMChannel=function(a){return this.getPMChannel("id",a.id)||this.pmChannelCache.push(new l(a,this)),this.getPMChannel("id",a.id)},a.prototype.setTopic=function(a,b){var c=arguments.length<=2||void 0===arguments[2]?function(a){}:arguments[2],d=this;return new Promise(function(e,g){function h(a){c(a),g(a)}function i(a){var g=d.getChannel("id",a);n.patch(f.CHANNELS+"/"+a).set("authorization",d.token).send({name:g.name,position:0,topic:b}).end(function(a,b){a?h(a):(g.topic=b.body.topic,e(),c())})}d.resolveDestination(a).then(i)["catch"](h)})},a.prototype.addServer=function(a){var b=this,c=this.getServer("id",a.id);if(a.unavailable)return b.trigger("unavailable",a),void b.debug("Server ID "+a.id+" has been marked unavailable by Discord. It was not cached.");if(!c&&(c=new h(a,this),this.serverCache.push(c),a.channels))for(var d=a.channels,e=Array.isArray(d),f=0,d=e?d:d[Symbol.iterator]();;){var g;if(e){if(f>=d.length)break;g=d[f++]}else{if(f=d.next(),f.done)break;g=f.value}var i=g;c.channels.push(this.addChannel(i,c.id))}for(var j=a.presences,k=Array.isArray(j),l=0,j=k?j:j[Symbol.iterator]();;){var m;if(k){if(l>=j.length)break;m=j[l++]}else{if(l=j.next(),l.done)break;m=l.value}var n=m,o=b.getUser("id",n.user.id);o.status=n.status,o.gameId=n.game_id}return c},a.prototype.getUser=function(a,b){for(var c=this.userCache,d=Array.isArray(c),e=0,c=d?c:c[Symbol.iterator]();;){var f;if(d){if(e>=c.length)break;f=c[e++]}else{if(e=c.next(),e.done)break;f=e.value}var g=f;if(g[a]===b)return g}return null},a.prototype.getChannel=function(a,b){for(var c=this.channelCache,d=Array.isArray(c),e=0,c=d?c:c[Symbol.iterator]();;){var f;if(d){if(e>=c.length)break;f=c[e++]}else{if(e=c.next(),e.done)break;f=e.value}var g=f;if(g[a]===b)return g}return this.getPMChannel(a,b)},a.prototype.getPMChannel=function(a,b){for(var c=this.pmChannelCache,d=Array.isArray(c),e=0,c=d?c:c[Symbol.iterator]();;){var f;if(d){if(e>=c.length)break;f=c[e++]}else{if(e=c.next(),e.done)break;f=e.value}var g=f;if(g[a]===b)return g}return null},a.prototype.getServer=function(a,b){for(var c=this.serverCache,d=Array.isArray(c),e=0,c=d?c:c[Symbol.iterator]();;){var f;if(d){if(e>=c.length)break;f=c[e++]}else{if(e=c.next(),e.done)break;f=e.value}var g=f;if(g[a]===b)return g}return null},a.prototype.trySendConnData=function(){if(this.token&&!this.alreadySentData){this.alreadySentData=!0;var a={op:2,d:{token:this.token,v:3,properties:{$os:"discord.js",$browser:"discord.js",$device:"discord.js",$referrer:"",$referring_domain:""}}};this.websocket.send(JSON.stringify(a))}},a.prototype.resolveServerID=function(a){return a instanceof h?a.id:!isNaN(a)&&a.length&&17===a.length?a:void 0},a.prototype.resolveDestination=function(a){var b=!1,c=this;return new Promise(function(d,e){if(a instanceof h)b=a.id;else if(a instanceof i)b=a.id;else if(a instanceof j)b=a.channel.id;else if(a instanceof l)b=a.id;else if(a instanceof g){for(var f=c.pmChannelCache,k=Array.isArray(f),m=0,f=k?f:f[Symbol.iterator]();;){var n;if(k){if(m>=f.length)break;n=f[m++]}else{if(m=f.next(),m.done)break;n=m.value}var o=n;if(o.user&&o.user.equals(a))return void d(o.id)}c.startPM(a).then(function(a){d(a.id)})["catch"](e)}else b=a;b?d(b):e()})},a.prototype._sendMessage=function(a,b,c,d){var e=this;return new Promise(function(g,h){n.post(f.CHANNELS+"/"+a+"/messages").set("authorization",e.token).send({content:b,mentions:d,tts:c}).end(function(a,b){if(a)h(a);else{var c=b.body,d=[];c.mentions=c.mentions||[];for(var f=c.mentions,i=Array.isArray(f),k=0,f=i?f:f[Symbol.iterator]();;){var l;if(i){if(k>=f.length)break;l=f[k++]}else{if(k=f.next(),k.done)break;l=k.value}var m=l;d.push(e.addUser(m))}var n=e.getChannel("id",c.channel_id);if(n){var o=n.addMessage(new j(c,n,d,e.addUser(c.author)));g(o)}}})})},a.prototype._sendFile=function(a,b){var c=arguments.length<=2||void 0===arguments[2]?"DEFAULT BECAUSE YOU DIDN'T SPECIFY WHY.png":arguments[2],d=this;return new Promise(function(e,g){n.post(f.CHANNELS+"/"+a+"/messages").set("authorization",d.token).attach("file",b,c).end(function(b,c){if(b)g(b);else{var f=d.getChannel("id",a);if(f){var h=f.addMessage(new j(c.body,f,[],d.user));e(h)}}})})},a.prototype._updateMessage=function(a,b){var c=this;return new Promise(function(d,e){n.patch(f.CHANNELS+"/"+a.channel.id+"/messages/"+a.id).set("authorization",c.token).send({content:b,mentions:[]}).end(function(b,c){if(b)e(b);else{var f=new j(c.body,a.channel,a.mentions,a.sender);d(f),a.channel.messages[a.channel.messages.indexOf(a)]=f}})})},a.prototype.getGateway=function(){var a=this;return new Promise(function(b,c){n.get(f.API+"/gateway").set("authorization",a.token).end(function(a,d){a?c(a):b(d.body.url)})})},a.prototype.setStatusIdle=function(){this.setStatus("idle")},a.prototype.setStatusOnline=function(){this.setStatus("online")},a.prototype.setStatusActive=function(){this.setStatusOnline()},a.prototype.setStatusHere=function(){this.setStatusOnline()},a.prototype.setStatusAway=function(){this.setStatusIdle()},a.prototype.startTyping=function(a,b){function c(a){if(!d.typingIntervals[a]){var c=function(){n.post(f.CHANNELS+"/"+a+"/typing").set("authorization",d.token).end()};c();var e=setInterval(c,3e3);d.typingIntervals[a]=e,b&&setTimeout(function(){d.stopTyping(a)},b)}}var d=this;this.resolveDestination(a).then(c)},a.prototype.stopTyping=function(a){function b(a){c.typingIntervals[a]&&(clearInterval(c.typingIntervals[a]),delete c.typingIntervals[a])}var c=this;this.resolveDestination(a).then(b)},a.prototype.setStatus=function(a){var b="online"===a?null:Date.now();this.__idleTime=b,this.websocket.send(JSON.stringify({op:3,d:{idle_since:this.__idleTime,game_id:this.__gameId}}))},a.prototype.setPlayingGame=function(a){if(a instanceof String||"string"==typeof a){var b=a.trim().toUpperCase();a=null;for(var c=m,d=Array.isArray(c),e=0,c=d?c:c[Symbol.iterator]();;){var f;if(d){if(e>=c.length)break;f=c[e++]}else{if(e=c.next(),e.done)break;f=e.value}var g=f;if(g.name.trim().toUpperCase()===b){a=g.id;break}}}this.__gameId=a,this.websocket.send(JSON.stringify({op:3,d:{idle_since:this.__idleTime,game_id:this.__gameId}}))},a.prototype.playGame=function(a){this.setPlayingGame(a)},a.prototype.playingGame=function(a){this.setPlayingGame(a)},e(a,[{key:"uptime",get:function(){return this.readyTime?Date.now()-this.readyTime:null}},{key:"ready",get:function(){return 3===this.state}},{key:"servers",get:function(){return this.serverCache}},{key:"channels",get:function(){return this.channelCache}},{key:"users",get:function(){return this.userCache}},{key:"PMChannels",get:function(){return this.pmChannelCache}},{key:"messages",get:function(){for(var a=[],b=this.channelCache,c=Array.isArray(b),d=0,b=c?b:b[Symbol.iterator]();;){var e;if(c){if(d>=b.length)break;e=b[d++]}else{if(d=b.next(),d.done)break;e=d.value}var f=e;a=a.concat(f.messages)}return a}}]),a}();b.exports=r},{"../ref/gameMap.json":19,"./Endpoints.js":3,"./PMChannel.js":6,"./channel.js":8,"./invite.js":10,"./message.js":11,"./server.js":12,"./user.js":13,fs:14,superagent:15,ws:18}],3:[function(a,b,c){"use strict";c.BASE_DOMAIN="discordapp.com",c.BASE="https://"+c.BASE_DOMAIN,c.WEBSOCKET_HUB="wss://"+c.BASE_DOMAIN+"/hub",c.API=c.BASE+"/api",c.AUTH=c.API+"/auth",c.LOGIN=c.AUTH+"/login",c.LOGOUT=c.AUTH+"/logout",c.USERS=c.API+"/users",c.SERVERS=c.API+"/guilds",c.CHANNELS=c.API+"/channels"},{}],4:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(b){d(this,a);this.packed=b,this.getBit(3)&&(this.packed=4294967295)}return a.prototype.serialise=function(){return{createInstantInvite:this.createInstantInvite,manageRoles:this.manageRoles,manageChannels:this.manageChannels,readMessages:this.readMessages,sendMessages:this.sendMessage,sendTTSMessages:this.sendTTSMessages,manageMessages:this.manageMessages,embedLinks:this.embedLinks,attachFiles:this.attachFiles,readMessageHistory:this.readMessageHistory,mentionEveryone:this.mentionEveryone,voiceConnect:this.voiceConnect,voiceSpeak:this.voiceSpeak,voiceMuteMembers:this.voiceMuteMembers,voiceDeafenMembers:this.voiceDeafenMembers,voiceMoveMember:this.voiceMoveMembers,voiceUseVoiceActivation:this.voiceUseVoiceActivation}},a.prototype.getBit=function(a){return 1===(this.packed>>>a&1)},a.prototype.setBit=function(){},e(a,[{key:"createInstantInvite",get:function(){return this.getBit(0)},set:function(a){this.setBit(0,a)}},{key:"manageRoles",get:function(){return this.getBit(3)},set:function(a){this.setBit(3,a)}},{key:"manageChannels",get:function(){return this.getBit(4)},set:function(a){this.setBit(4,a)}},{key:"readMessages",get:function(){return this.getBit(10)},set:function(a){this.setBit(10,a)}},{key:"sendMessages",get:function(){return this.getBit(11)},set:function(a){this.setBit(11,a)}},{key:"sendTTSMessages",get:function(){return this.getBit(12)},set:function(a){this.setBit(12,a)}},{key:"manageMessages",get:function(){return this.getBit(13)},set:function(a){this.setBit(13,a)}},{key:"embedLinks",get:function(){return this.getBit(14)},set:function(a){this.setBit(14,a)}},{key:"attachFiles",get:function(){return this.getBit(15)},set:function(a){this.setBit(15,a)}},{key:"readMessageHistory",get:function(){return this.getBit(16)},set:function(a){this.setBit(16,a)}},{key:"mentionEveryone",get:function(){return this.getBit(17)},set:function(a){this.setBit(17,a)}},{key:"voiceConnect",get:function(){return this.getBit(20)},set:function(a){this.setBit(20,a)}},{key:"voiceSpeak",get:function(){return this.getBit(21)},set:function(a){this.setBit(21,a)}},{key:"voiceMuteMembers",get:function(){return this.getBit(22)},set:function(a){this.setBit(22,a)}},{key:"voiceDeafenMembers",get:function(){return this.getBit(23)},set:function(a){this.setBit(23,a)}},{key:"voiceMoveMembers",get:function(){return this.getBit(24)},set:function(a){this.setBit(24,a)}},{key:"voiceUseVoiceActivation",get:function(){return this.getBit(25)},set:function(a){this.setBit(25,a)}}]),a}();b.exports=f},{}],5:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=a("./user.js"),h=a("./ServerPermissions.js"),i=a("./EvaluatedPermissions.js"),j=function(a){function b(c,e,f){d(this,b),a.call(this,c),this.server=e,this.rawRoles=f}return e(b,a),b.prototype.permissionsIn=function(a){if(a.server.ownerID===this.id)return new i(4294967295);for(var b=[],c=[],d=a.roles,e=Array.isArray(d),f=0,d=e?d:d[Symbol.iterator]();;){var g;if(e){if(f>=d.length)break;g=d[f++]}else{if(f=d.next(),f.done)break;g=f.value}var h=g;h.id===this.id&&"member"===h.type?c.push(h):-1!==this.rawRoles.indexOf(h.id)&&b.push(h)}if(0===b.length&&0===c.length)return new i(this.evalPerms.packed);for(var j=0!==b.length?b[0].packed:c[0].packed,k=b,l=Array.isArray(k),m=0,k=l?k:k[Symbol.iterator]();;){var n;if(l){if(m>=k.length)break;n=k[m++]}else{if(m=k.next(),m.done)break;n=m.value}var h=n;j&=~h.deny,j|=h.allow}for(var o=c,p=Array.isArray(o),q=0,o=p?o:o[Symbol.iterator]();;){var r;if(p){if(q>=o.length)break;r=o[q++]}else{if(q=o.next(),q.done)break;r=q.value}var h=r;j&=~h.deny,j|=h.allow}return new i(j)},f(b,[{key:"roles",get:function(){for(var a=[this.server.getRole(this.server.id)],b=this.rawRoles,c=Array.isArray(b),d=0,b=c?b:b[Symbol.iterator]();;){var e;if(c){if(d>=b.length)break;e=b[d++]}else{if(d=b.next(),d.done)break;e=d.value}var f=e;a.push(this.server.getRole(f))}return a}},{key:"evalPerms",get:function(){for(var a=this.roles,b=a[0].packed,c=a,d=Array.isArray(c),e=0,c=d?c:c[Symbol.iterator]();;){var f;if(d){if(e>=c.length)break;f=c[e++]}else{if(e=c.next(),e.done)break;f=e.value}var g=f;b|=g.packed}return new h({permissions:b})}}]),b}(g);b.exports=j},{"./EvaluatedPermissions.js":4,"./ServerPermissions.js":7,"./user.js":13}],6:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(b,c){d(this,a),this.user=c.getUser("id",b.recipient.id),this.id=b.id,this.messages=[],this.client=c}return a.prototype.addMessage=function(a){return this.getMessage("id",a.id)||this.messages.push(a),this.getMessage("id",a.id)},a.prototype.getMessage=function(a,b){this.messages.length>1e3&&this.messages.splice(0,1);for(var c=this.messages,d=Array.isArray(c),e=0,c=d?c:c[Symbol.iterator]();;){var f;if(d){if(e>=c.length)break;f=c[e++]}else{if(e=c.next(),e.done)break;f=e.value}var g=f;if(g[a]===b)return g}return null},e(a,[{key:"isPrivate",get:function(){return!0}}]),a}();b.exports=f},{}],7:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(b){d(this,a);this.packed=b.permissions,this.name=b.name,this.id=b.id}return a.prototype.getBit=function(a){return 1===(this.packed>>>a&1)},a.prototype.setBit=function(){},a.prototype.toString=function(){return this.name},e(a,[{key:"createInstantInvite",get:function(){return this.getBit(0)},set:function(a){this.setBit(0,a)}},{key:"banMembers",get:function(){return this.getBit(1)},set:function(a){this.setBit(1,a)}},{key:"kickMembers",get:function(){return this.getBit(2)},set:function(a){this.setBit(2,a)}},{key:"manageRoles",get:function(){return this.getBit(3)},set:function(a){this.setBit(3,a)}},{key:"manageChannels",get:function(){return this.getBit(4)},set:function(a){this.setBit(4,a);
}},{key:"manageServer",get:function(){return this.getBit(5)},set:function(a){this.setBit(5,a)}},{key:"readMessages",get:function(){return this.getBit(10)},set:function(a){this.setBit(10,a)}},{key:"sendMessages",get:function(){return this.getBit(11)},set:function(a){this.setBit(11,a)}},{key:"sendTTSMessages",get:function(){return this.getBit(12)},set:function(a){this.setBit(12,a)}},{key:"manageMessages",get:function(){return this.getBit(13)},set:function(a){this.setBit(13,a)}},{key:"embedLinks",get:function(){return this.getBit(14)},set:function(a){this.setBit(14,a)}},{key:"attachFiles",get:function(){return this.getBit(15)},set:function(a){this.setBit(15,a)}},{key:"readMessageHistory",get:function(){return this.getBit(16)},set:function(a){this.setBit(16,a)}},{key:"mentionEveryone",get:function(){return this.getBit(17)},set:function(a){this.setBit(17,a)}},{key:"voiceConnect",get:function(){return this.getBit(20)},set:function(a){this.setBit(20,a)}},{key:"voiceSpeak",get:function(){return this.getBit(21)},set:function(a){this.setBit(21,a)}},{key:"voiceMuteMembers",get:function(){return this.getBit(22)},set:function(a){this.setBit(22,a)}},{key:"voiceDeafenMembers",get:function(){return this.getBit(23)},set:function(a){this.setBit(23,a)}},{key:"voiceMoveMembers",get:function(){return this.getBit(24)},set:function(a){this.setBit(24,a)}},{key:"voiceUseVoiceActivation",get:function(){return this.getBit(25)},set:function(a){this.setBit(25,a)}}]),a}();b.exports=f},{}],8:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=a("./ChannelPermissions.js"),g=function(){function a(b,c){if(d(this,a),this.server=c,this.name=b.name,this.type=b.type,this.topic=b.topic,this.id=b.id,this.messages=[],this.roles=[],b.permission_overwrites)for(var e=b.permission_overwrites,g=Array.isArray(e),h=0,e=g?e:e[Symbol.iterator]();;){var i;if(g){if(h>=e.length)break;i=e[h++]}else{if(h=e.next(),h.done)break;i=h.value}var j=i;this.roles.push(new f(j,this))}}return a.prototype.permissionsOf=function(a){var b=this.server.getMember("id",a.id);return b?b.permissionsIn(this):null},a.prototype.equals=function(a){return a&&a.id===this.id},a.prototype.addMessage=function(a){return this.messages.length>1e3&&this.messages.splice(0,1),this.getMessage("id",a.id)||this.messages.push(a),this.getMessage("id",a.id)},a.prototype.getMessage=function(a,b){for(var c=this.messages,d=Array.isArray(c),e=0,c=d?c:c[Symbol.iterator]();;){var f;if(d){if(e>=c.length)break;f=c[e++]}else{if(e=c.next(),e.done)break;f=e.value}var g=f;if(g[a]===b)return g}return null},a.prototype.toString=function(){return"<#"+this.id+">"},e(a,[{key:"permissionOverwrites",get:function(){return this.roles}},{key:"permissions",get:function(){return this.roles}},{key:"client",get:function(){return this.server.client}},{key:"isPrivate",get:function(){return!1}},{key:"users",get:function(){return this.server.members}},{key:"members",get:function(){return this.server.members}}]),a}();b.exports=g},{"./ChannelPermissions.js":1}],9:[function(a,b,c){"use strict";var d=(a("superagent"),a("./Endpoints.js")),e=a("./Client.js"),f={Endpoints:d,Client:e};f.patchStrings=function(){function a(a,b){Object.defineProperty(String.prototype,a,{get:function(){return b+this+b}})}a("bold","**"),a("underline","__"),a("strike","~~"),a("code","`"),a("codeblock","```"),a("newline","\n"),Object.defineProperty(String.prototype,"italic",{get:function(){return"*"+this+"*"}})},b.exports=f},{"./Client.js":2,"./Endpoints.js":3,superagent:15}],10:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(b,c){d(this,a),this.max_age=b.max_age,this.code=b.code,this.server=c.getServer("id",b.guild.id),this.revoked=b.revoked,this.created_at=Date.parse(b.created_at),this.temporary=b.temporary,this.uses=b.uses,this.max_uses=b.uses,this.inviter=c.addUser(b.inviter),this.xkcd=b.xkcdpass,this.channel=c.getChannel("id",b.channel.id)}return e(a,[{key:"URL",get:function(){var a=this.xkcd?this.xkcdpass:this.code;return"https://discord.gg/"+a}}]),a}();b.exports=f},{}],11:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=(a("./PMChannel.js"),function(){function a(b,c,e,f){d(this,a),this.tts=b.tts,this.timestamp=Date.parse(b.timestamp),this.nonce=b.nonce,this.mentions=e,this.everyoneMentioned=b.mention_everyone,this.id=b.id,this.embeds=b.embeds,this.editedTimestamp=b.edited_timestamp,this.content=b.content.trim(),this.channel=c,this.isPrivate?this.author=this.channel.client.getUser("id",f.id):this.author=this.channel.server.getMember("id",f.id)||this.channel.client.getUser("id",f.id),this.attachments=b.attachments}return a.prototype.isMentioned=function(a){for(var b=a.id?a.id:a,c=this.mentions,d=Array.isArray(c),e=0,c=d?c:c[Symbol.iterator]();;){var f;if(d){if(e>=c.length)break;f=c[e++]}else{if(e=c.next(),e.done)break;f=e.value}var g=f;if(g.id===b)return!0}return!1},e(a,[{key:"sender",get:function(){return this.author}},{key:"isPrivate",get:function(){return this.channel.isPrivate}}]),a}());b.exports=f},{"./PMChannel.js":6}],12:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=a("./ServerPermissions.js"),g=a("./Member.js"),h=function(){function a(b,c){d(this,a),this.client=c,this.region=b.region,this.ownerID=b.owner_id,this.name=b.name,this.id=b.id,this.members=[],this.channels=[],this.icon=b.icon,this.afkTimeout=b.afk_timeout,this.afkChannelId=b.afk_channel_id,this.roles=[];for(var e=b.roles,g=Array.isArray(e),h=0,e=g?e:e[Symbol.iterator]();;){var i;if(g){if(h>=e.length)break;i=e[h++]}else{if(h=e.next(),h.done)break;i=h.value}var j=i;this.roles.push(new f(j))}if(!b.members)return void(b.members=[c.user]);for(var k=b.members,l=Array.isArray(k),m=0,k=l?k:k[Symbol.iterator]();;){var n;if(l){if(m>=k.length)break;n=k[m++]}else{if(m=k.next(),m.done)break;n=m.value}var o=n;o.user&&this.addMember(c.addUser(o.user),o.roles)}}return a.prototype.getRole=function(a){for(var b=this.roles,c=Array.isArray(b),d=0,b=c?b:b[Symbol.iterator]();;){var e;if(c){if(d>=b.length)break;e=b[d++]}else{if(d=b.next(),d.done)break;e=d.value}var f=e;if(f.id===a)return f}return null},a.prototype.updateRole=function(a){var b=this.getRole(a.id);if(b){var c=this.roles.indexOf(b);return this.roles[c]=new f(a),this.roles[c]}return!1},a.prototype.removeRole=function(a){for(var b in this.roles)this.roles[b].id===a&&this.roles.splice(b,1);for(var c=this.members,d=Array.isArray(c),e=0,c=d?c:c[Symbol.iterator]();;){var f;if(d){if(e>=c.length)break;f=c[e++]}else{if(e=c.next(),e.done)break;f=e.value}var g=f;for(var b in g.rawRoles)g.rawRoles[b]===a&&g.rawRoles.splice(b,1)}},a.prototype.getChannel=function(a,b){for(var c=this.channels,d=Array.isArray(c),e=0,c=d?c:c[Symbol.iterator]();;){var f;if(d){if(e>=c.length)break;f=c[e++]}else{if(e=c.next(),e.done)break;f=e.value}var g=f;if(g[a]===b)return g}return null},a.prototype.getMember=function(a,b){for(var c=this.members,d=Array.isArray(c),e=0,c=d?c:c[Symbol.iterator]();;){var f;if(d){if(e>=c.length)break;f=c[e++]}else{if(e=c.next(),e.done)break;f=e.value}var g=f;if(g[a]===b)return g}return null},a.prototype.removeMember=function(a,b){for(var c=this.members,d=Array.isArray(c),e=0,c=d?c:c[Symbol.iterator]();;){var f;if(d){if(e>=c.length)break;f=c[e++]}else{if(e=c.next(),e.done)break;f=e.value}var g=f;if(g[a]===b)return this.members.splice(a,1),g}return!1},a.prototype.addChannel=function(a){return this.getChannel("id",a.id)||this.channels.push(a),a},a.prototype.addMember=function(a,b){if(!this.getMember("id",a.id)){var c=new g(a,this,b);this.members.push(c)}return c},a.prototype.toString=function(){return this.name},a.prototype.equals=function(a){return a.id===this.id},e(a,[{key:"permissionGroups",get:function(){return this.roles}},{key:"permissions",get:function(){return this.roles}},{key:"iconURL",get:function(){return this.icon?"https://discordapp.com/api/guilds/"+this.id+"/icons/"+this.icon+".jpg":null}},{key:"afkChannel",get:function(){return this.afkChannelId?this.getChannel("id",this.afkChannelId):!1}},{key:"defaultChannel",get:function(){return this.getChannel("name","general")}},{key:"owner",get:function(){return this.client.getUser("id",this.ownerID)}},{key:"users",get:function(){return this.members}}]),a}();b.exports=h},{"./Member.js":5,"./ServerPermissions.js":7}],13:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(b){d(this,a),this.username=b.username,this.discriminator=b.discriminator,this.id=b.id,this.avatar=b.avatar,this.status=b.status||"offline",this.gameId=b.game_id||null}return a.prototype.mention=function(){return"<@"+this.id+">"},a.prototype.toString=function(){return this.mention()},a.prototype.equals=function(a){return a.id===this.id},a.prototype.equalsStrict=function(a){return a.id===this.id&&a.avatar===this.avatar&&a.username===this.username&&a.discriminator===this.discriminator},e(a,[{key:"avatarURL",get:function(){return this.avatar?"https://discordapp.com/api/users/"+this.id+"/avatars/"+this.avatar+".jpg":null}}]),a}();b.exports=f},{}],14:[function(a,b,c){},{}],15:[function(a,b,c){function d(){}function e(a){var b={}.toString.call(a);switch(b){case"[object File]":case"[object Blob]":case"[object FormData]":return!0;default:return!1}}function f(a){return a===Object(a)}function g(a){if(!f(a))return a;var b=[];for(var c in a)null!=a[c]&&b.push(encodeURIComponent(c)+"="+encodeURIComponent(a[c]));return b.join("&")}function h(a){for(var b,c,d={},e=a.split("&"),f=0,g=e.length;g>f;++f)c=e[f],b=c.split("="),d[decodeURIComponent(b[0])]=decodeURIComponent(b[1]);return d}function i(a){var b,c,d,e,f=a.split(/\r?\n/),g={};f.pop();for(var h=0,i=f.length;i>h;++h)c=f[h],b=c.indexOf(":"),d=c.slice(0,b).toLowerCase(),e=r(c.slice(b+1)),g[d]=e;return g}function j(a){return a.split(/ *; */).shift()}function k(a){return q(a.split(/ *; */),function(a,b){var c=b.split(/ *= */),d=c.shift(),e=c.shift();return d&&e&&(a[d]=e),a},{})}function l(a,b){b=b||{},this.req=a,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||"undefined"==typeof this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText,this.setStatusProperties(this.xhr.status),this.header=this.headers=i(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this.setHeaderProperties(this.header),this.body="HEAD"!=this.req.method?this.parseBody(this.text?this.text:this.xhr.response):null}function m(a,b){var c=this;p.call(this),this._query=this._query||[],this.method=a,this.url=b,this.header={},this._header={},this.on("end",function(){var a=null,b=null;try{b=new l(c)}catch(d){return a=new Error("Parser is unable to parse the response"),a.parse=!0,a.original=d,c.callback(a)}if(c.emit("response",b),a)return c.callback(a,b);if(b.status>=200&&b.status<300)return c.callback(a,b);var e=new Error(b.statusText||"Unsuccessful HTTP response");e.original=a,e.response=b,e.status=b.status,c.callback(e,b)})}function n(a,b){return"function"==typeof b?new m("GET",a).end(b):1==arguments.length?new m("GET",a):new m(a,b)}var o,p=a("emitter"),q=a("reduce");o="undefined"!=typeof window?window:"undefined"!=typeof self?self:this,n.getXHR=function(){if(!(!o.XMLHttpRequest||o.location&&"file:"==o.location.protocol&&o.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(a){}return!1};var r="".trim?function(a){return a.trim()}:function(a){return a.replace(/(^\s*|\s*$)/g,"")};n.serializeObject=g,n.parseString=h,n.types={html:"text/html",json:"application/json",xml:"application/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},n.serialize={"application/x-www-form-urlencoded":g,"application/json":JSON.stringify},n.parse={"application/x-www-form-urlencoded":h,"application/json":JSON.parse},l.prototype.get=function(a){return this.header[a.toLowerCase()]},l.prototype.setHeaderProperties=function(a){var b=this.header["content-type"]||"";this.type=j(b);var c=k(b);for(var d in c)this[d]=c[d]},l.prototype.parse=function(a){return this.parser=a,this},l.prototype.parseBody=function(a){var b=this.parser||n.parse[this.type];return b&&a&&(a.length||a instanceof Object)?b(a):null},l.prototype.setStatusProperties=function(a){1223===a&&(a=204);var b=a/100|0;this.status=this.statusCode=a,this.statusType=b,this.info=1==b,this.ok=2==b,this.clientError=4==b,this.serverError=5==b,this.error=4==b||5==b?this.toError():!1,this.accepted=202==a,this.noContent=204==a,this.badRequest=400==a,this.unauthorized=401==a,this.notAcceptable=406==a,this.notFound=404==a,this.forbidden=403==a},l.prototype.toError=function(){var a=this.req,b=a.method,c=a.url,d="cannot "+b+" "+c+" ("+this.status+")",e=new Error(d);return e.status=this.status,e.method=b,e.url=c,e},n.Response=l,p(m.prototype),m.prototype.use=function(a){return a(this),this},m.prototype.timeout=function(a){return this._timeout=a,this},m.prototype.clearTimeout=function(){return this._timeout=0,clearTimeout(this._timer),this},m.prototype.abort=function(){return this.aborted?void 0:(this.aborted=!0,this.xhr.abort(),this.clearTimeout(),this.emit("abort"),this)},m.prototype.set=function(a,b){if(f(a)){for(var c in a)this.set(c,a[c]);return this}return this._header[a.toLowerCase()]=b,this.header[a]=b,this},m.prototype.unset=function(a){return delete this._header[a.toLowerCase()],delete this.header[a],this},m.prototype.getHeader=function(a){return this._header[a.toLowerCase()]},m.prototype.type=function(a){return this.set("Content-Type",n.types[a]||a),this},m.prototype.accept=function(a){return this.set("Accept",n.types[a]||a),this},m.prototype.auth=function(a,b){var c=btoa(a+":"+b);return this.set("Authorization","Basic "+c),this},m.prototype.query=function(a){return"string"!=typeof a&&(a=g(a)),a&&this._query.push(a),this},m.prototype.field=function(a,b){return this._formData||(this._formData=new o.FormData),this._formData.append(a,b),this},m.prototype.attach=function(a,b,c){return this._formData||(this._formData=new o.FormData),this._formData.append(a,b,c),this},m.prototype.send=function(a){var b=f(a),c=this.getHeader("Content-Type");if(b&&f(this._data))for(var d in a)this._data[d]=a[d];else"string"==typeof a?(c||this.type("form"),c=this.getHeader("Content-Type"),"application/x-www-form-urlencoded"==c?this._data=this._data?this._data+"&"+a:a:this._data=(this._data||"")+a):this._data=a;return!b||e(a)?this:(c||this.type("json"),this)},m.prototype.callback=function(a,b){var c=this._callback;this.clearTimeout(),c(a,b)},m.prototype.crossDomainError=function(){var a=new Error("Origin is not allowed by Access-Control-Allow-Origin");a.crossDomain=!0,this.callback(a)},m.prototype.timeoutError=function(){var a=this._timeout,b=new Error("timeout of "+a+"ms exceeded");b.timeout=a,this.callback(b)},m.prototype.withCredentials=function(){return this._withCredentials=!0,this},m.prototype.end=function(a){var b=this,c=this.xhr=n.getXHR(),f=this._query.join("&"),g=this._timeout,h=this._formData||this._data;this._callback=a||d,c.onreadystatechange=function(){if(4==c.readyState){var a;try{a=c.status}catch(d){a=0}if(0==a){if(b.timedout)return b.timeoutError();if(b.aborted)return;return b.crossDomainError()}b.emit("end")}};var i=function(a){a.total>0&&(a.percent=a.loaded/a.total*100),b.emit("progress",a)};this.hasListeners("progress")&&(c.onprogress=i);try{c.upload&&this.hasListeners("progress")&&(c.upload.onprogress=i)}catch(j){}if(g&&!this._timer&&(this._timer=setTimeout(function(){b.timedout=!0,b.abort()},g)),f&&(f=n.serializeObject(f),this.url+=~this.url.indexOf("?")?"&"+f:"?"+f),c.open(this.method,this.url,!0),this._withCredentials&&(c.withCredentials=!0),"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof h&&!e(h)){var k=this.getHeader("Content-Type"),l=n.serialize[k?k.split(";")[0]:""];l&&(h=l(h))}for(var m in this.header)null!=this.header[m]&&c.setRequestHeader(m,this.header[m]);return this.emit("request",this),c.send(h),this},m.prototype.then=function(a,b){return this.end(function(c,d){c?b(c):a(d)})},n.Request=m,n.get=function(a,b,c){var d=n("GET",a);return"function"==typeof b&&(c=b,b=null),b&&d.query(b),c&&d.end(c),d},n.head=function(a,b,c){var d=n("HEAD",a);return"function"==typeof b&&(c=b,b=null),b&&d.send(b),c&&d.end(c),d},n.del=function(a,b){var c=n("DELETE",a);return b&&c.end(b),c},n.patch=function(a,b,c){var d=n("PATCH",a);return"function"==typeof b&&(c=b,b=null),b&&d.send(b),c&&d.end(c),d},n.post=function(a,b,c){var d=n("POST",a);return"function"==typeof b&&(c=b,b=null),b&&d.send(b),c&&d.end(c),d},n.put=function(a,b,c){var d=n("PUT",a);return"function"==typeof b&&(c=b,b=null),b&&d.send(b),c&&d.end(c),d},b.exports=n},{emitter:16,reduce:17}],16:[function(a,b,c){function d(a){return a?e(a):void 0}function e(a){for(var b in d.prototype)a[b]=d.prototype[b];return a}b.exports=d,d.prototype.on=d.prototype.addEventListener=function(a,b){return this._callbacks=this._callbacks||{},(this._callbacks[a]=this._callbacks[a]||[]).push(b),this},d.prototype.once=function(a,b){function c(){d.off(a,c),b.apply(this,arguments)}var d=this;return this._callbacks=this._callbacks||{},c.fn=b,this.on(a,c),this},d.prototype.off=d.prototype.removeListener=d.prototype.removeAllListeners=d.prototype.removeEventListener=function(a,b){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var c=this._callbacks[a];if(!c)return this;if(1==arguments.length)return delete this._callbacks[a],this;for(var d,e=0;e<c.length;e++)if(d=c[e],d===b||d.fn===b){c.splice(e,1);break}return this},d.prototype.emit=function(a){this._callbacks=this._callbacks||{};var b=[].slice.call(arguments,1),c=this._callbacks[a];if(c){c=c.slice(0);for(var d=0,e=c.length;e>d;++d)c[d].apply(this,b)}return this},d.prototype.listeners=function(a){return this._callbacks=this._callbacks||{},this._callbacks[a]||[]},d.prototype.hasListeners=function(a){return!!this.listeners(a).length}},{}],17:[function(a,b,c){b.exports=function(a,b,c){for(var d=0,e=a.length,f=3==arguments.length?c:a[d++];e>d;)f=b.call(null,f,a[d],++d,a);return f}},{}],18:[function(a,b,c){function d(a,b,c){var d;return d=b?new f(a,b):new f(a)}var e=function(){return this}(),f=e.WebSocket||e.MozWebSocket;b.exports=f?d:null,f&&(d.prototype=f.prototype)},{}],19:[function(a,b,c){b.exports=[{executables:{win32:["pol.exe"]},id:0,name:"FINAL FANTASY XI"},{executables:{win32:["ffxiv.exe","ffxiv_dx11.exe"]},id:1,name:"FINAL FANTASY XIV"},{executables:{win32:["Wow.exe","Wow-64.exe"]},id:3,name:"World of Warcraft"},{executables:{darwin:["LoLLauncher.app"],win32:["LolClient.exe","League of Legends.exe"]},id:4,name:"League of Legends"},{executables:{darwin:["Diablo%20III.app"],win32:["Diablo III.exe"]},id:5,name:"Diablo 3"},{executables:{darwin:["dota_osx.app"],win32:["dota2.exe"]},id:6,name:"DOTA 2"},{executables:{darwin:["Heroes.app"],win32:["Heroes of the Storm.exe","HeroesOfTheStorm_x64.exe","HeroesOfTheStorm.exe"]},id:7,name:"Heroes of the Storm"},{executables:{darwin:["Hearthstone.app"],win32:["Hearthstone.exe"]},id:8,name:"Hearthstone"},{executables:{win32:["csgo.exe"]},id:9,name:"Counter-Strike: Global Offensive"},{executables:{win32:["WorldOfTanks.exe"]},id:10,name:"World of Tanks"},{executables:{darwin:["gw2.app"],win32:["gw2.exe"]},id:11,name:"Guild Wars 2"},{executables:{win32:["dayz.exe"]},id:12,name:"Day Z"},{executables:{darwin:["starcraft%20ii.app"],win32:["starcraft ii.exe","SC2_x64.exe","SC2.exe"]},id:13,name:"Starcraft II"},{executables:{win32:["diablo.exe"]},id:14,name:"Diablo"},{executables:{win32:["diablo ii.exe"]},id:15,name:"Diablo 2"},{executables:{win32:["left4dead.exe"]},id:17,name:"Left 4 Dead"},{executables:{darwin:["minecraft.app"],win32:["minecraft.exe"]},id:18,name:"Minecraft"},{executables:{win32:["smite.exe"]},id:19,name:"Smite"},{executables:{win32:["bf4.exe"]},id:20,name:"Battlefield 4"},{executables:{win32:["AoK HD.exe","empires2.exe"]},id:101,name:"Age of Empire II"},{executables:{win32:["age3y.exe"]},id:102,name:"Age of Empire III"},{executables:{win32:["AlanWake.exe"]},id:104,name:"Alan Wake"},{executables:{win32:["alan_wakes_american_nightmare.exe"]},id:105,name:"Alan Wake's American Nightmare"},{executables:{win32:["AlienBreed2Assault.exe"]},id:106,name:"Alien Breed 2: Assault"},{executables:{win32:["Amnesia.exe"]},id:107,name:"Amnesia: The Dark Descent"},{executables:{win32:["UDK.exe"]},id:108,name:"Antichamber"},{executables:{win32:["ArcheAge.exe"]},id:109,name:"ArcheAge"},{executables:{win32:["arma3.exe"]},id:110,name:"Arma III"},{executables:{win32:["AC3SP.exe"]},id:111,name:"Assassin's Creed 3"},{executables:{win32:["Bastion.exe"]},id:112,name:"Bastion"},{executables:{win32:["BF2.exe"]},id:113,name:"Battlefield 2"},{executables:{win32:["bf3.exe"]},id:114,name:"Battlefield 3"},{executables:{win32:["Besiege.exe"]},id:116,name:"Besiege"},{executables:{win32:["Bioshock.exe"]},id:117,name:"Bioshock"},{executables:{win32:["Bioshock2.exe"]},id:118,name:"BioShock II"},{executables:{win32:["BioShockInfinite.exe"]},id:119,name:"BioShock Infinite"},{executables:{win32:["Borderlands2.exe"]},id:122,name:"Borderlands 2"},{executables:{win32:["braid.exe"]},id:123,name:"Braid"},{executables:{win32:["ShippingPC-StormGame.exe"]},id:124,name:"Bulletstorm"},{executables:{},id:125,name:"Cabal 2"},{executables:{win32:["CabalMain.exe"]},id:126,name:"Cabal Online"},{executables:{win32:["iw4mp.exe","iw4sp.exe"]},id:127,name:"Call of Duty: Modern Warfare 2"},{executables:{win32:["t6sp.exe"]},id:128,name:"Call of Duty: Black Ops"},{executables:{win32:["iw5mp.exe"]},id:129,name:"Call of Duty: Modern Warfare 3"},{executables:{win32:["RelicCOH.exe"]},id:132,name:"Company of Heroes"},{executables:{win32:["Crysis64.exe"]},id:135,name:"Crysis"},{executables:{win32:["Crysis2.exe"]},id:136,name:"Crysis 2"},{executables:{win32:["Crysis3.exe"]},id:137,name:"Crysis 3"},{executables:{win32:["Crysis.exe"]},id:138,name:"Crysis 4 "},{executables:{win32:["DATA.exe"]},id:140,name:"Dark Souls"},{executables:{win32:["DarkSoulsII.exe"]},id:141,name:"Dark Souls II"},{executables:{win32:["dfuw.exe"]},id:142,name:"Darkfall: Unholy Wars"},{executables:{win32:["DCGAME.exe"]},id:144,name:"DC Universe Online"},{executables:{win32:["DeadIslandGame.exe"]},id:145,name:"Dead Island"},{executables:{win32:["deadspace2.exe"]},id:146,name:"Dead Space 2"},{executables:{win32:["LOTDGame.exe"]},id:147,name:"Deadlight"},{executables:{win32:["dxhr.exe"]},id:148,name:"Deus Ex: Human Revolution"},{executables:{win32:["DeviMayCry4.exe"]},id:149,name:"Devil May Cry 4"},{executables:{win32:["DMC-DevilMayCry.exe"]},id:150,name:"DmC Devil May Cry"},{executables:{win32:["dirt2_game.exe"]},id:154,name:"DiRT 2"},{executables:{win32:["dirt3_game.exe"]},id:155,name:"DiRT 3"},{executables:{win32:["dota.exe"]},id:156,name:"DOTA"},{executables:{win32:["DoubleDragon.exe"]},id:158,name:"Double Dragon Neon"},{executables:{win32:["DragonAge2.exe"]},id:159,name:"Dragon Age II"},{executables:{win32:["DragonAgeInquisition.exe"]},id:160,name:"Dragon Age: Inquisition"},{executables:{win32:["daorigins.exe"]},id:161,name:"Dragon Age: Origins"},{executables:{win32:["DBXV.exe"]},id:162,name:"Dragon Ball XenoVerse"},{executables:{win32:["DukeForever.exe"]},id:163,name:"Duke Nukem Forever"},{executables:{darwin:["Dustforce.app"],win32:["dustforce.exe"]},id:164,name:"Dustforce"},{executables:{win32:["EliteDangerous32.exe"]},id:165,name:"Elite: Dangerous"},{executables:{win32:["exefile.exe"]},id:166,name:"Eve Online"},{executables:{win32:["eqgame.exe"]},id:167,name:"EverQuest"},{executables:{win32:["EverQuest2.exe"]},id:168,name:"EverQuest II"},{executables:{},id:169,name:"EverQuest Next"},{executables:{win32:["Engine.exe"]},id:170,name:"F.E.A.R."},{executables:{win32:["FEAR2.exe"]},id:171,name:"F.E.A.R. 2: Project Origin"},{executables:{win32:["fallout3.exe"]},id:172,name:"Fallout 3"},{executables:{win32:["FalloutNV.exe"]},id:174,name:"Fallout: New Vegas"},{executables:{win32:["farcry3.exe"]},id:175,name:"Far Cry 3"},{executables:{win32:["fifa15.exe"]},id:176,name:"FIFA 15"},{executables:{win32:["FTLGame.exe"]},id:180,name:"FTL: Faster Than Light"},{executables:{win32:["GTAIV.exe"]},id:181,name:"Grand Theft Auto 4"},{executables:{win32:["GTA5.exe"]},id:182,name:"Grand Theft Auto 5"},{executables:{win32:["Gw.exe"]},id:183,name:"Guild Wars"},{executables:{win32:["H1Z1.exe"]},id:186,name:"H1Z1"},{executables:{win32:["HL2HL2.exe","hl2.exe"]},id:188,name:"Half Life 2"},{executables:{win32:["HOMEFRONT.exe"]},id:195,name:"Homefront"},{executables:{win32:["invisibleinc.exe"]},id:196,name:"Invisible Inc."},{executables:{win32:["LANoire.exe"]},id:197,name:"L.A. Noire"},{executables:{win32:["Landmark64.exe"]},id:198,name:"Landmark"},{executables:{win32:["left4dead2.exe"]},id:201,name:"Left 4 Dead 2"},{executables:{win32:["lineage.exe"]},id:203,name:"Lineage"},{executables:{win32:["Magicka.exe"]},id:206,name:"Magicka"},{executables:{win32:["MapleStory.exe"]},id:208,name:"MapleStory"},{executables:{},id:209,name:"Mark of the Ninja"},{executables:{win32:["MassEffect.exe"]},id:210,name:"Mass Effect"},{executables:{win32:["MassEffect2.exe"]},id:211,name:"Mass Effect 2"},{executables:{win32:["MassEffect3Demo.exe"]},id:212,name:"Mass Effect 3"},{executables:{win32:["METAL GEAR RISING REVENGEANCE.exe"]},id:214,name:"Metal Gear Rising: Revengeance"},{executables:{win32:["metro2033.exe"]},id:215,name:"Metro 2033"},{executables:{win32:["MetroLL.exe"]},id:216,name:"Metro Last Light"},{executables:{win32:["MK10.exe"]},id:218,name:"Mortal Kombat X"},{executables:{win32:["speed.exe"]},id:219,name:"Need For Speed Most Wanted"},{executables:{},id:220,name:"Neverwinder"},{executables:{darwin:["Outlast.app"],win32:["OLGame.exe"]},id:221,name:"Outlast"},{executables:{win32:["PapersPlease.exe"]},id:222,name:"Papers, Please"},{executables:{win32:["payday_win32_release.exe"]},id:223,name:"PAYDAY"},{executables:{win32:["payday2_win32_release.exe"]},id:224,name:"PAYDAY2"},{executables:{win32:["PillarsOfEternity.exe"]},id:225,name:"Pillars of Eternity"},{executables:{win32:["PA.exe"]},id:226,name:"Planetary Annihilation"},{executables:{win32:["planetside2_x86.exe"]},id:227,name:"Planetside 2"},{executables:{win32:["hl2P.exe"]},id:228,name:"Portal"},{executables:{win32:["portal2.exe"]},id:229,name:"Portal 2"},{executables:{win32:["PrimalCarnageGame.exe"]},id:231,name:"Primal Cargnage"},{executables:{win32:["pCARS.exe"]},id:232,name:"Project Cars"},{executables:{win32:["RaceTheSun.exe"]},id:233,name:"Race The Sun"},{executables:{win32:["Rage.exe"]},id:234,name:"RAGE"},{executables:{win32:["ragexe.exe"]},id:235,name:"Ragnarok Online"},{executables:{win32:["rift.exe"]},id:236,name:"Rift"},{executables:{win32:["Rocksmith2014.exe"]},id:237,name:"Rocksmith 2014"},{executables:{win32:["SwiftKit-RS.exe","JagexLauncher.exe"]},id:238,name:"RuneScape"},{executables:{win32:["Shadowgrounds.exe"]},id:239,name:"Shadowgrounds"},{executables:{win32:["survivor.exe"]},id:240,name:"Shadowgrounds: Survivor"},{executables:{win32:["ShovelKnight.exe"]},id:241,name:"Shovel Knight"},{executables:{win32:["SimCity.exe"]},id:242,name:"SimCity"},{executables:{win32:["SporeApp.exe"]},id:245,name:"Spore"},{executables:{win32:["StarCitizen.exe"]},id:246,name:"Star Citizen"},{executables:{},id:247,name:"Star Trek Online"},{executables:{win32:["battlefront.exe"]},id:248,name:"Star Wars Battlefront"},{executables:{win32:["swtor.exe"]},id:249,name:"Star Wars: The Old Republic"},{executables:{win32:["starbound.exe","starbound_opengl.exe"]},id:250,name:"Starbound"},{executables:{win32:["starcraft.exe"]},id:251,name:"Starcraft"},{executables:{win32:["SSFIV.exe"]},id:253,name:"Ultra Street Fighter IV"},{executables:{win32:["superhexagon.exe"]},id:254,name:"Super Hexagon"},{executables:{win32:["swordandsworcery_pc.exe"]},id:255,name:"Superbrothers: Sword & Sworcery EP"},{executables:{win32:["hl2TF.exe"]},id:256,name:"Team Fortress 2"},{executables:{win32:["TERA.exe"]},id:258,name:"TERA"},{executables:{win32:["Terraria.exe"]},id:259,name:"Terraria"},{executables:{win32:["Bethesda.net_Launcher.exe"]},id:260,name:"The Elder Scrolls Online"},{executables:{win32:["TESV.exe"]},id:261,name:"The Elder Scrolls V: Skyrim"},{executables:{win32:["TheSecretWorld.exe"]},id:262,name:"The Secret World"},{executables:{win32:["TS3.exe","ts3w.exe"]},id:264,name:"The Sims 3"},{executables:{win32:["WALKINGDEAD101.EXE"]},id:265,name:"The Walking Dead"},{executables:{win32:["TheWalkingDead2.exe"]},id:266,name:"The Walking Dead Season Two"},{executables:{win32:["witcher3.exe"]},id:267,name:"The Witcher 3"},{executables:{win32:["Future Soldier.exe"]},id:268,name:"Tom Clancy's Ghost Recon: Future Solider"},{executables:{win32:["TombRaider.exe"]},id:269,name:"Tomb Raider (2013)"},{executables:{win32:["Torchlight.exe"]},id:271,name:"Torchlight"},{executables:{win32:["Torchlight2.exe"]},id:272,name:"Torchlight 2"},{executables:{win32:["Shogun2.exe"]},id:273,name:"Total War: Shogun 2"},{executables:{win32:["Transistor.exe"]},id:274,name:"Transistor"},{executables:{win32:["trine.exe"]},id:275,name:"Trine"},{executables:{win32:["trine2_32bit.exe"]},id:276,name:"Trine 2"},{executables:{win32:["UOKR.exe"]},id:277,name:"Ultima Online"},{executables:{win32:["aces.exe"]},id:279,name:"War Thunder"},{executables:{win32:["Warcraft III.exe","wc3.exe"]},id:281,name:"Warcraft 3: Reign of Chaos"},{executables:{win32:["Warcraft II BNE.exe"]},id:282,name:"Warcraft II"},{executables:{win32:["Warframe.x64.exe","Warframe.exe"]},id:283,name:"Warframe"},{executables:{win32:["watch_dogs.exe"]},id:284,name:"Watch Dogs"},{executables:{win32:["WildStar64.exe"]},id:285,name:"WildStar"},{executables:{win32:["XComGame.exe"]},id:288,name:"XCOM: Enemy Unknown"},{executables:{win32:["DFO.exe","dfo.exe"]},id:289,name:"Dungeon Fighter Online"},{executables:{win32:["aclauncher.exe","acclient.exe"]},id:290,name:"Asheron's Call"},{executables:{win32:["MapleStory2.exe"]},id:291,name:"MapleStory 2"},{executables:{win32:["ksp.exe"]},id:292,name:"Kerbal Space Program"},{executables:{win32:["PINBALL.EXE"]},id:293,name:"3D Pinball: Space Cadet"},{executables:{win32:["dave.exe"]},id:294,name:"Dangerous Dave"},{executables:{win32:["iwbtgbeta(slomo).exe","iwbtgbeta(fs).exe"]},
id:295,name:"I Wanna Be The Guy"},{executables:{win32:["MechWarriorOnline.exe "]},id:296,name:"Mech Warrior Online"},{executables:{win32:["dontstarve_steam.exe"]},id:297,name:"Don't Starve"},{executables:{win32:["GalCiv3.exe"]},id:298,name:"Galactic Civilization 3"},{executables:{win32:["Risk of Rain.exe"]},id:299,name:"Risk of Rain"},{executables:{win32:["Binding_of_Isaac.exe","Isaac-ng.exe"]},id:300,name:"The Binding of Isaac"},{executables:{win32:["RustClient.exe"]},id:301,name:"Rust"},{executables:{win32:["Clicker Heroes.exe"]},id:302,name:"Clicker Heroes"},{executables:{win32:["Brawlhalla.exe"]},id:303,name:"Brawlhalla"},{executables:{win32:["TownOfSalem.exe"]},id:304,name:"Town of Salem"},{executables:{win32:["osu!.exe"]},id:305,name:"osu!"},{executables:{win32:["PathOfExileSteam.exe","PathOfExile.exe"]},id:306,name:"Path of Exile"},{executables:{win32:["Dolphin.exe"]},id:307,name:"Dolphin"},{executables:{win32:["RocketLeague.exe"]},id:308,name:"Rocket League"},{executables:{win32:["TJPP.exe"]},id:309,name:"Jackbox Party Pack"},{executables:{win32:["KFGame.exe"]},id:310,name:"Killing Floor 2"},{executables:{win32:["ShooterGame.exe"]},id:311,name:"Ark: Survival Evolved"},{executables:{win32:["LifeIsStrange.exe"]},id:312,name:"Life Is Strange"},{executables:{win32:["Client_tos.exe"]},id:313,name:"Tree of Savior"},{executables:{win32:["olliolli2.exe"]},id:314,name:"OlliOlli2"},{executables:{win32:["cw.exe"]},id:315,name:"Closers Dimension Conflict"},{executables:{win32:["ESSTEAM.exe","elsword.exe","x2.exe"]},id:316,name:"Elsword"},{executables:{win32:["ori.exe"]},id:317,name:"Ori and the Blind Forest"},{executables:{win32:["Skyforge.exe"]},id:318,name:"Skyforge"},{executables:{win32:["projectzomboid64.exe","projectzomboid32.exe"]},id:319,name:"Project Zomboid"},{executables:{win32:["From_The_Depths.exe"]},id:320,name:"The Depths"},{executables:{win32:["TheCrew.exe"]},id:321,name:"The Crew"},{executables:{win32:["MarvelHeroes2015.exe"]},id:322,name:"Marvel Heroes 2015"},{executables:{win32:["timeclickers.exe"]},id:324,name:"Time Clickers"},{executables:{win32:["eurotrucks2.exe"]},id:325,name:"Euro Truck Simulator 2"},{executables:{win32:["FarmingSimulator2015Game.exe"]},id:326,name:"Farming Simulator 15"},{executables:{win32:["strife.exe"]},id:327,name:"Strife"},{executables:{win32:["Awesomenauts.exe"]},id:328,name:"Awesomenauts"},{executables:{win32:["Dofus.exe"]},id:329,name:"Dofus"},{executables:{win32:["Boid.exe"]},id:330,name:"Boid"},{executables:{win32:["adventure-capitalist.exe"]},id:331,name:"AdVenture Capitalist"},{executables:{win32:["OrcsMustDie2.exe"]},id:332,name:"Orcs Must Die! 2"},{executables:{win32:["Mountain.exe"]},id:333,name:"Mountain"},{executables:{win32:["Valkyria.exe"]},id:335,name:"Valkyria Chronicles"},{executables:{win32:["ffxiiiimg.exe"]},id:336,name:"Final Fantasy XIII"},{executables:{win32:["TLR.exe"]},id:337,name:"The Last Remnant"},{executables:{win32:["Cities.exe"]},id:339,name:"Cities Skylines"},{executables:{win32:["worldofwarships.exe","WoWSLauncher.exe"]},id:341,name:"World of Warships"},{executables:{win32:["spacegame-Win64-shipping.exe"]},id:342,name:"Fractured Space"},{executables:{win32:["thespacegame.exe"]},id:343,name:"Ascent - The Space Game"},{executables:{win32:["DuckGame.exe"]},id:344,name:"Duck Game"},{executables:{win32:["PPSSPPWindows.exe"]},id:345,name:"PPSSPP"},{executables:{win32:["MBAA.exe"]},id:346,name:"Melty Blood Actress Again: Current Code"},{executables:{win32:["TheWolfAmongUs.exe"]},id:347,name:"The Wolf Among Us"},{executables:{win32:["SpaceEngineers.exe"]},id:348,name:"Space Engineers"},{executables:{win32:["Borderlands.exe"]},id:349,name:"Borderlands"},{executables:{win32:["100orange.exe"]},id:351,name:"100% Orange Juice"},{executables:{win32:["reflex.exe"]},id:354,name:"Reflex"},{executables:{win32:["pso2.exe"]},id:355,name:"Phantasy Star Online 2"},{executables:{win32:["AssettoCorsa.exe"]},id:356,name:"Assetto Corsa"},{executables:{win32:["iw3mp.exe","iw3sp.exe"]},id:357,name:"Call of Duty 4: Modern Warfare"},{executables:{win32:["WolfOldBlood_x64.exe"]},id:358,name:"Wolfenstein: The Old Blood"},{executables:{win32:["castle.exe"]},id:359,name:"Castle Crashers"},{executables:{win32:["vindictus.exe"]},id:360,name:"Vindictus"},{executables:{win32:["ShooterGame-Win32-Shipping.exe"]},id:361,name:"Dirty Bomb"},{executables:{win32:["BatmanAK.exe"]},id:362,name:"Batman Arkham Knight"},{executables:{win32:["drt.exe"]},id:363,name:"Dirt Rally"},{executables:{win32:["rFactor.exe"]},id:364,name:"rFactor"},{executables:{win32:["clonk.exe"]},id:365,name:"Clonk Rage"},{executables:{win32:["SRHK.exe"]},id:366,name:"Shadowrun: Hong Kong"},{executables:{win32:["Insurgency.exe"]},id:367,name:"Insurgency"},{executables:{win32:["StepMania.exe"]},id:368,name:"Step Mania"},{executables:{win32:["FirefallCLient.exe"]},id:369,name:"Firefall"},{executables:{win32:["mirrorsedge.exe"]},id:370,name:"Mirrors Edge"},{executables:{win32:["MgsGroundZeroes.exe"]},id:371,name:"Metal Gear Solid V: Ground Zeroes"},{executables:{win32:["mgsvtpp.exe"]},id:372,name:"Metal Gear Solid V: The Phantom Pain"},{executables:{win32:["tld.exe"]},id:373,name:"The Long Dark"},{executables:{win32:["TKOM.exe"]},id:374,name:"Take On Mars"},{executables:{win32:["robloxplayerlauncher.exe","Roblox.exe"]},id:375,name:"Roblox"},{executables:{win32:["eu4.exe"]},id:376,name:"Europa Universalis 4"},{executables:{win32:["APB.exe"]},id:377,name:"APB Reloaded"},{executables:{win32:["Robocraft.exe"]},id:378,name:"Robocraft"},{executables:{win32:["Unity.exe"]},id:379,name:"Unity"},{executables:{win32:["Simpsons.exe"]},id:380,name:"The Simpsons: Hit & Run"},{executables:{win32:["Dnlauncher.exe","DragonNest.exe"]},id:381,name:"Dragon Nest"},{executables:{win32:["Trove.exe"]},id:382,name:"Trove"},{executables:{win32:["EndlessLegend.exe"]},id:383,name:"Endless Legend"},{executables:{win32:["TurbineLauncher.exe","dndclient.exe"]},id:384,name:"Dungeons & Dragons Online"},{executables:{win32:["quakelive.exe","quakelive_steam.exe"]},id:385,name:"Quake Live"},{executables:{win32:["7DaysToDie.exe"]},id:386,name:"7DaysToDie"},{executables:{win32:["SpeedRunners.exe"]},id:387,name:"SpeedRunners"},{executables:{win32:["gamemd.exe"]},id:388,name:"Command & Conquer: Red Alert 2"},{executables:{win32:["generals.exe"]},id:389,name:"Command & Conquer Generals: Zero Hour"},{executables:{win32:["Oblivion.exe"]},id:390,name:"The Elder Scrolls 4: Oblivion"},{executables:{win32:["mgsi.exe"]},id:391,name:"Metal Gear Solid"},{executables:{win32:["EoCApp.exe"]},id:392,name:"Divinity - Original Sin"},{executables:{win32:["Torment.exe"]},id:393,name:"Planescape: Torment"},{executables:{win32:["HexPatch.exe"]},id:394,name:"Hex: Shards of Fate"},{executables:{win32:["NS3FB.exe"]},id:395,name:"Naruto Shippuden Ultimate Ninja Storm 3 Full Burst"},{executables:{win32:["NSUNSR.exe"]},id:396,name:"Naruto Shippuden Ultimate Ninja Storm Revolution"},{executables:{win32:["SaintsRowIV.exe"]},id:397,name:"Saints Row IV"},{executables:{win32:["Shadowrun.exe"]},id:398,name:"Shadowrun"},{executables:{win32:["DungeonoftheEndless.exe"]},id:399,name:"Dungeon of the Endless"},{executables:{win32:["Hon.exe"]},id:400,name:"Heroes of Newerth"},{executables:{win32:["mabinogi.exe"]},id:401,name:"Mabinogi"},{executables:{win32:["CoD2MP_s.exe","CoDSP_s.exe"]},id:402,name:"Call of Duty 2:"},{executables:{win32:["CoDWaWmp.exe","CoDWaw.exe"]},id:403,name:"Call of Duty: World at War"},{executables:{win32:["heroes.exe"]},id:404,name:"Mabinogi Heroes (Vindictus) "},{executables:{win32:["KanColleViewer.exe"]},id:405,name:"KanColle "},{executables:{win32:["cyphers.exe"]},id:406,name:"Cyphers"},{executables:{win32:["RelicCoH2.exe"]},id:407,name:"Company of Heroes 2"},{executables:{win32:["MJ.exe"]},id:408,name:"セガNET麻雀MJ"},{executables:{win32:["ge.exe"]},id:409,name:"Granado Espada"},{executables:{win32:["NovaRO.exe"]},id:410,name:"Nova Ragnarok Online"},{executables:{win32:["RivalsofAether.exe"]},id:411,name:"Rivals of Aether"},{executables:{win32:["bfh.exe"]},id:412,name:"Battlefield Hardline"},{executables:{win32:["GrowHome.exe"]},id:413,name:"Grow Home"},{executables:{win32:["patriots.exe"]},id:414,name:"Rise of Nations Extended"},{executables:{win32:["Railroads.exe"]},id:415,name:"Sid Meier's Railroads!"},{executables:{win32:["Empire.exe"]},id:416,name:"Empire: Total War"},{executables:{win32:["Napoleon.exe"]},id:417,name:"Napoleon: Total War"},{executables:{win32:["gta_sa.exe"]},id:418,name:"Grand Theft Auto: San Andreas"},{executables:{win32:["MadMax.exe"]},id:419,name:"Mad Max"},{executables:{win32:["Titanfall.exe"]},id:420,name:"Titanfall"},{executables:{win32:["age2_x1.exe"]},id:421,name:"Age of Empires II: The Conquerors"},{executables:{win32:["Rome2.exe"]},id:422,name:"Total War: ROME 2"},{executables:{win32:["ShadowOfMordor.exe"]},id:423,name:"Middle-earth: Shadow of Mordor"},{executables:{win32:["Subnautica.exe"]},id:424,name:"Subnautica"},{executables:{win32:["anno5.exe"]},id:425,name:"Anno 2070"},{executables:{win32:["carrier.exe"]},id:426,name:"Carrier Command Gaea Mission"},{executables:{win32:["DarksidersPC.exe"]},id:427,name:"Darksiders"},{executables:{win32:["Darksiders2.exe"]},id:428,name:"Darksiders 2"},{executables:{win32:["mudlet.exe"]},id:429,name:"Mudlet"},{executables:{win32:["DunDefLauncher.exe"]},id:430,name:"Dungeon Defenders II"},{executables:{win32:["hng.exe"]},id:431,name:"Heroes and Generals"},{executables:{win32:["WFTOGame.exe"]},id:432,name:"War of the Overworld"},{executables:{win32:["Talisman.exe"]},id:433,name:"Talisman: Digital Edition"},{executables:{win32:["limbo.exe"]},id:434,name:"Limbo"},{executables:{win32:["ibbobb.exe"]},id:435,name:"ibb & obb"},{executables:{win32:["BattleBlockTheater.exe"]},id:436,name:"BattleBlock Theater"},{executables:{win32:["iracinglauncher.exe","iracingsim.exe","iracingsim64.exe"]},id:437,name:"iRacing"},{executables:{win32:["CivilizationV_DX11.exe"]},id:438,name:"Civilization V"}]},{}]},{},[9])(9)});