@discordjs/voice 0.15.0 → 0.15.1-dev.1678709071-41077c9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -164,7 +164,7 @@ function deleteAudioPlayer(player) {
164
164
  audioPlayers.splice(index, 1);
165
165
  if (audioPlayers.length === 0) {
166
166
  nextTime = -1;
167
- if (typeof audioCycleInterval !== "undefined")
167
+ if (audioCycleInterval !== void 0)
168
168
  clearTimeout(audioCycleInterval);
169
169
  }
170
170
  }
@@ -449,7 +449,7 @@ var VoiceWebSocket = class extends import_node_events2.EventEmitter {
449
449
  * @param ms - The interval in milliseconds. If negative, the interval will be unset
450
450
  */
451
451
  setHeartbeatInterval(ms) {
452
- if (typeof this.heartbeatInterval !== "undefined")
452
+ if (this.heartbeatInterval !== void 0)
453
453
  clearInterval(this.heartbeatInterval);
454
454
  if (ms > 0) {
455
455
  this.heartbeatInterval = setInterval(() => {
@@ -765,7 +765,7 @@ to ${stringifyState(newState)}`);
765
765
  const state = this.state;
766
766
  if (state.code !== NetworkingStatusCode.Ready)
767
767
  return false;
768
- if (typeof state.preparedPacket !== "undefined") {
768
+ if (state.preparedPacket !== void 0) {
769
769
  this.playAudioPacket(state.preparedPacket);
770
770
  state.preparedPacket = void 0;
771
771
  return true;
@@ -1358,7 +1358,7 @@ var AudioReceiveStream = class extends import_node_stream.Readable {
1358
1358
  this.end = end;
1359
1359
  }
1360
1360
  push(buffer) {
1361
- if (buffer && (this.end.behavior === EndBehaviorType.AfterInactivity || this.end.behavior === EndBehaviorType.AfterSilence && (buffer.compare(SILENCE_FRAME) !== 0 || typeof this.endTimeout === "undefined"))) {
1361
+ if (buffer && (this.end.behavior === EndBehaviorType.AfterInactivity || this.end.behavior === EndBehaviorType.AfterSilence && (buffer.compare(SILENCE_FRAME) !== 0 || this.endTimeout === void 0))) {
1362
1362
  this.renewEndTimeout(this.end);
1363
1363
  }
1364
1364
  return super.push(buffer);
@@ -1753,9 +1753,9 @@ var VoiceConnection = class extends import_node_events7.EventEmitter {
1753
1753
  */
1754
1754
  addStatePacket(packet) {
1755
1755
  this.packets.state = packet;
1756
- if (typeof packet.self_deaf !== "undefined")
1756
+ if (packet.self_deaf !== void 0)
1757
1757
  this.joinConfig.selfDeaf = packet.self_deaf;
1758
- if (typeof packet.self_mute !== "undefined")
1758
+ if (packet.self_mute !== void 0)
1759
1759
  this.joinConfig.selfMute = packet.self_mute;
1760
1760
  if (packet.channel_id)
1761
1761
  this.joinConfig.channelId = packet.channel_id;
@@ -2439,7 +2439,7 @@ function createAudioResource(input, options = {}) {
2439
2439
  let needsInlineVolume = Boolean(options.inlineVolume);
2440
2440
  if (typeof input === "string") {
2441
2441
  inputType = StreamType.Arbitrary;
2442
- } else if (typeof inputType === "undefined") {
2442
+ } else if (inputType === void 0) {
2443
2443
  const analysis = inferStreamType(input);
2444
2444
  inputType = analysis.streamType;
2445
2445
  needsInlineVolume = needsInlineVolume && !analysis.hasVolume;