mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
For some reason there's a way to join text channels via the Discord API but not the Discord Client, so this commit prevents the Client from crashing by checking to see if the channels are voice channels.
29 lines
1.2 KiB
JavaScript
29 lines
1.2 KiB
JavaScript
"use strict";
|
|
// represents an intent of streaming music
|
|
exports.__esModule = true;
|
|
|
|
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 _events = require("events");
|
|
|
|
var _events2 = _interopRequireDefault(_events);
|
|
|
|
var StreamIntent = (function (_EventEmitter) {
|
|
_inherits(StreamIntent, _EventEmitter);
|
|
|
|
function StreamIntent() {
|
|
_classCallCheck(this, StreamIntent);
|
|
|
|
_EventEmitter.call(this);
|
|
}
|
|
|
|
return StreamIntent;
|
|
})(_events2["default"]);
|
|
|
|
exports["default"] = StreamIntent;
|
|
module.exports = exports["default"];
|