From a1dd37d444d404c52c4a3d807ac413ba5d161aca Mon Sep 17 00:00:00 2001 From: KillerBossOriginal Date: Wed, 3 Jul 2024 16:38:00 +0200 Subject: [PATCH] Token e custom url facoltativi --- src/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/index.ts b/src/index.ts index e29ffd9..b0a4047 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,7 @@ import { io } from "socket.io-client"; import CreditsManager from "./CreditsManager.js"; import EventEmitter from 'node:events'; -import IAManager from "./IAManager.js"; +import {IAManager} from "./IAManager.js"; export default class TNC extends EventEmitter { token: string | undefined; @@ -20,10 +20,10 @@ export default class TNC extends EventEmitter { constructor(options?: { customURL?: string, token?: string }) { super(); if (options) { - this.URL = options.customURL || this.URL; - this.token = options.token; + if (options.customURL) this.URL = options.customURL; + if (options.token) this.token = options.token; } - this.credits = new CreditsManager(this.URL, this.token); + // this.credits = new CreditsManager(this.URL, this.token); this.IA = new IAManager(this.URL, this.token); }