Token e custom url facoltativi
This commit is contained in:
parent
c71fc7388b
commit
a1dd37d444
1 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
||||||
import { io } from "socket.io-client";
|
import { io } from "socket.io-client";
|
||||||
import CreditsManager from "./CreditsManager.js";
|
import CreditsManager from "./CreditsManager.js";
|
||||||
import EventEmitter from 'node:events';
|
import EventEmitter from 'node:events';
|
||||||
import IAManager from "./IAManager.js";
|
import {IAManager} from "./IAManager.js";
|
||||||
|
|
||||||
export default class TNC extends EventEmitter {
|
export default class TNC extends EventEmitter {
|
||||||
token: string | undefined;
|
token: string | undefined;
|
||||||
|
@ -20,10 +20,10 @@ export default class TNC extends EventEmitter {
|
||||||
constructor(options?: { customURL?: string, token?: string }) {
|
constructor(options?: { customURL?: string, token?: string }) {
|
||||||
super();
|
super();
|
||||||
if (options) {
|
if (options) {
|
||||||
this.URL = options.customURL || this.URL;
|
if (options.customURL) this.URL = options.customURL;
|
||||||
this.token = options.token;
|
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);
|
this.IA = new IAManager(this.URL, this.token);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue