Skip to content

Commit

Permalink
fix(KirishimaNode): validate options correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
KagChi committed Mar 14, 2022
1 parent 7df7a20 commit 194f5ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Structures/KirishimaNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { KirishimaNodeOptions } from '../typings';
import type { Kirishima } from './Kirishima';
import { GatewayVoiceServerUpdateDispatch, GatewayVoiceStateUpdateDispatch } from 'discord-api-types/gateway/v9';
import { LavalinkStatsPayload, WebsocketOpEnum } from 'lavalink-api-types';
import { KirishimaPlayer } from './KirishimaPlayer';

export class KirishimaNode {
public ws!: Gateway;
public rest!: REST;
Expand Down Expand Up @@ -47,7 +47,7 @@ export class KirishimaNode {

public open(gateway: Gateway) {
this.reconnect.attempts = 0;
if (this.kirishima.options.node) {
if (this.kirishima.options.node?.resumeKey && this.kirishima.options.node.resumeTimeout) {
void this.ws.send({
op: WebsocketOpEnum.CONFIGURE_RESUMING,
key: this.kirishima.options.node.resumeKey,
Expand Down

0 comments on commit 194f5ee

Please sign in to comment.