diff --git a/src/container.ts b/src/container.ts deleted file mode 100644 index 7acd5d1..0000000 --- a/src/container.ts +++ /dev/null @@ -1,13 +0,0 @@ -export class Container { - static container: Container - - instance: Record = [] - - set(key: string, value: T) { - this.instance[key] = value - } - - get(key: string): T { - return this.instance[key] - } -} diff --git a/src/index.ts b/src/index.ts index 87a821e..99ee438 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,4 @@ import { ShewenyClient } from "sheweny"; -import {Container} from "./container"; import {Config} from "./config"; import * as TOML from "toml"; import * as fs from "fs"; @@ -7,12 +6,16 @@ import * as fs from "fs"; const configurationFile = fs.readFileSync("./config.toml").toString() const configuration = TOML.parse(configurationFile) as Config -const container = new Container() -container.set("config", configuration) -Container.container = container +class Client extends ShewenyClient { + readonly config = configuration -const client = new ShewenyClient({ - intents: ["GUILDS", "GUILD_MEMBERS", "GUILD_MESSAGES"], -}); + constructor() { + super({ + intents: ["GUILDS", "GUILD_MEMBERS", "GUILD_MESSAGES"], + }); -client.login(configuration.token) + this.login(this.config.token) + } +} + +new Client();