diff --git a/src/module/szurubooru/client.ts b/src/module/szurubooru/client.ts index 31aa723..5ef2420 100644 --- a/src/module/szurubooru/client.ts +++ b/src/module/szurubooru/client.ts @@ -11,7 +11,7 @@ function getRandomInt(min, max) { return Math.floor(Math.random() * (max - min)) + min; //The maximum is exclusive and the minimum is inclusive } -class SzurubooruClient { +export class SzurubooruClient { url: string; baseUrl: string; @@ -132,6 +132,4 @@ class SzurubooruClient { return null; }) } -} - -export { SzurubooruClient as Client }; \ No newline at end of file +} \ No newline at end of file diff --git a/src/module/szurubooru/index.ts b/src/module/szurubooru/index.ts index 09e9db9..54089db 100644 --- a/src/module/szurubooru/index.ts +++ b/src/module/szurubooru/index.ts @@ -4,9 +4,12 @@ let { AbstractModule } = require('../abstract'); let { logger } = require('../../logging'); -let szurubooruClient = require('./client'); +import { SzurubooruClient } from './client'; class SzurubooruModule extends AbstractModule { + + client: SzurubooruClient; + constructor() { super( "Szurubooru", @@ -36,7 +39,7 @@ class SzurubooruModule extends AbstractModule { postInit() { super.postInit(); - this.client = new szurubooruClient.Client( + this.client = new SzurubooruClient( this.get("url"), this.get("username"), this.get("token")