mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 01:53:30 +01:00
Folder turned necessary after Discord debate
This commit is contained in:
45
lib/Structures/Channel.js
Normal file
45
lib/Structures/Channel.js
Normal file
@@ -0,0 +1,45 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||||
|
||||
var _UtilEquality = require("../Util/Equality");
|
||||
|
||||
var _UtilEquality2 = _interopRequireDefault(_UtilEquality);
|
||||
|
||||
var _UtilArgumentRegulariser = require("../Util/ArgumentRegulariser");
|
||||
|
||||
var Channel = (function (_Equality) {
|
||||
_inherits(Channel, _Equality);
|
||||
|
||||
function Channel(data, client) {
|
||||
_classCallCheck(this, Channel);
|
||||
|
||||
_Equality.call(this);
|
||||
this.id = data.id;
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
Channel.prototype["delete"] = function _delete() {
|
||||
return this.client.deleteChannel.apply(this.client, _UtilArgumentRegulariser.reg(this, arguments));
|
||||
};
|
||||
|
||||
_createClass(Channel, [{
|
||||
key: "isPrivate",
|
||||
get: function get() {
|
||||
return !!this.server;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Channel;
|
||||
})(_UtilEquality2["default"]);
|
||||
|
||||
exports["default"] = Channel;
|
||||
module.exports = exports["default"];
|
||||
Reference in New Issue
Block a user