mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Folder turned necessary after Discord debate
This commit is contained in:
32
lib/Structures/Invite.js
Normal file
32
lib/Structures/Invite.js
Normal file
@@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
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;
|
||||
})();
|
||||
|
||||
exports["default"] = Invite;
|
||||
module.exports = exports["default"];
|
||||
Reference in New Issue
Block a user