Skip to content

Commit

Permalink
Remove deprecated methods as notified
Browse files Browse the repository at this point in the history
  • Loading branch information
utarwyn committed Nov 21, 2021
1 parent d707c99 commit 69e4d2b
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions src/index.ts
Expand Up @@ -32,19 +32,13 @@ class TicTacToe {
* Constructs the game controller.
*
* @param config tictactoe configuration, default if not provided
* @param client deprecated: if you want to attach a client to the module. Now use attach method.
*/
constructor(config?: Config, client?: Client) {
constructor(config?: Config) {
this.config = config ?? {};
this.eventHandler = new EventHandler();
this.bot = new TicTacToeBot(this.config, this.eventHandler);

localize.loadFromLocale(this.config.language);

// Deprecated, remove this in a next future
if (client) {
this.attach(client);
}
}

/**
Expand Down Expand Up @@ -106,16 +100,6 @@ class TicTacToe {
public on(eventName: EventType, listener: (data?: any) => void): void {
this.eventHandler.registerListener(eventName, listener);
}

/**
* Old method which connects the module through an internal Discord client.
* Please now use {@link login} method. Will be removed in a next future.
*
* @deprecated
*/
public async connect(): Promise<void> {
return this.login();
}
}

export = TicTacToe;

0 comments on commit 69e4d2b

Please sign in to comment.