Files
discord.js/lib/Structures/Invite.js
Amish Shah 213379e669 Fixed compiled version
Downgraded babel until a working solution found
2015-11-22 17:13:52 +00:00

32 lines
974 B
JavaScript

"use strict";
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Server = require("./Server.js");
var ServerChannel = require("./ServerChannel.js");
var Invite = (function () {
function Invite(data, chan, client) {
_classCallCheck(this, Invite);
this.maxAge = data.max_age;
this.code = data.code;
this.server = chan.server;
this.channel = chan;
this.revoked = data.revoked;
this.createdAt = Date.parse(data.created_at);
this.temporary = data.temporary;
this.uses = data.uses;
this.maxUses = data.uses;
this.inviter = client.internal.users.get("id", data.inviter.id);
this.xkcd = data.xkcdpass;
}
Invite.prototype.toString = function toString() {
return "https://discord.gg/" + this.code;
};
return Invite;
})();
module.exports = Invite;