Skip to content

Commit

Permalink
AutoCommit: Bump Repository (Update Repository Files)
Browse files Browse the repository at this point in the history
  • Loading branch information
thealternatedev committed Oct 25, 2023
1 parent 6d1a5ba commit 282d96e
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bin/commands/InitCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ module.exports = () => CommandBuilder.createBuilder("init")

step("Installing Required dependencies")

//InitializationTools.installRequired();
InitializationTools.installRequired();

step("Done! Created All Files");

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"watch": "tsc --watch",
"build-watch": "npm run build & npm run watch",
"start": "node bin/index.js",
"publish": "npm run build"
"prepublish": "npm run build"
},
"repository": {
"type": "git",
Expand Down
2 changes: 2 additions & 0 deletions src/client/RedactClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ export class RedactClient {
}, true);

this.logger.info(`Connected to ${Color.greenBright(this.getBotUsername())} at ${Color.greenBright(new Date().toUTCString())}`);
this.logger.info(` ├── Loaded ${Color.yellow(this.getCommandsManager().getLoadedCommandsAmount())} number of commands`)
this.logger.info(` ├── Loaded ${Color.yellow(this.getEventManager().getLoadedEventsAmount())} number of events`);
this.logger.info(` └── Amount of servers ${Color.yellow(this.getClient().guilds.cache.size)}`);

if (this.readyEvent)
Expand Down
4 changes: 4 additions & 0 deletions src/client/commands/CommandsManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ export class CommandsManager extends Loader<RedactCommand> {
}
}

public getLoadedCommandsAmount(): number {
return this.commands.size + 1;
}

public loadAndCall(commandFolderPath: string, callback: (command: RedactCommand) => void) {
const commands = this.loadFrom(commandFolderPath, false);
for (const command of commands) {
Expand Down
1 change: 0 additions & 1 deletion src/client/commands/RedactCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export abstract class RedactCommand {
private client?: RedactClient;
private commandData: CommandData;


constructor(commandData: CommandData) {
this.commandData = commandData;
}
Expand Down
4 changes: 4 additions & 0 deletions src/client/events/EventManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,8 @@ export class EventManager extends Loader<Event> {
this.registerEvent(event);
}
}

public getLoadedEventsAmount() {
return this.events.size + 1;
}
}
2 changes: 2 additions & 0 deletions typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export class CommandsManager extends Loader<RedactCommand> {
public unregisterCommand(command: string): boolean;
public loadCommands(commandFolderPath: string): void;
public loadAndCall(commandFolderPath: string, callback: (command: RedactCommand) => void): void;
public getLoadedCommandsAmount(): number;

}

Expand All @@ -54,6 +55,7 @@ export class EventManager extends Loader<Event> {
public registerEvent(event: Event): boolean;
public loadEvents(eventFolderPath: string): void;
public loadAndCall(eventFolderPath: string, callback: (event: Event) => void): void;
public getLoadedEventsAmount(): number;

}

Expand Down

0 comments on commit 282d96e

Please sign in to comment.