Archived
1.0.0 -> CommandsManager to CommandManager, finalizing documentation
This commit is contained in:
1 parent
8a7ac598a6
commit
a9d5914f10
6 files changed
+69
-11
No files matched your search
+3
-3
@@ -1,6 +1,6 @@
|
||||
//IMPORTS
|
||||
import { Client, ClientOptions, Message } from 'discord.js';
|
||||
import { Command, CommandsManager, CommandMessageStructure, PermissionsError } from './Command.js';
|
||||
import { Command, CommandManager, CommandMessageStructure, PermissionsError } from './Command.js';
|
||||
import { HelpMessage, HelpMessageParams } from './Help.js';
|
||||
import * as http from 'http';
|
||||
import { SystemMessageManager } from './SystemMessage.js';
|
||||
@@ -23,7 +23,7 @@ interface ConstructorOptions {
|
||||
class Bot {
|
||||
name: string;
|
||||
client: Client;
|
||||
commands: CommandsManager;
|
||||
commands: CommandManager;
|
||||
config: ConfigurationOptions;
|
||||
messages: {
|
||||
help: HelpMessageParams,
|
||||
@@ -37,7 +37,7 @@ class Bot {
|
||||
constructor(options: ConstructorOptions) {
|
||||
this.name = options.name;
|
||||
this.client = new Client(options.clientOptions);
|
||||
this.commands = new CommandsManager(options.prefix, options.argumentSeparator);
|
||||
this.commands = new CommandManager(options.prefix, options.argumentSeparator);
|
||||
this.config = {
|
||||
token: options.token,
|
||||
helpCommand: options.helpCommand != undefined ? options.helpCommand : true
|
||||
|
||||
+2
-2
@@ -91,7 +91,7 @@ class Command {
|
||||
}
|
||||
}
|
||||
}
|
||||
class CommandsManager {
|
||||
class CommandManager {
|
||||
list: Command[];
|
||||
prefix: string;
|
||||
argumentSeparator: string;
|
||||
@@ -219,4 +219,4 @@ class CommandsManager {
|
||||
}
|
||||
|
||||
//EXPORTS
|
||||
export { Command, CommandsManager, CommandMessageStructure, PermissionsError }
|
||||
export { Command, CommandManager, CommandMessageStructure, PermissionsError }
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import { ColorResolvable, MessageEmbed } from 'discord.js';
|
||||
import { Command, CommandsManager } from './Command.js';
|
||||
import { Command, CommandManager } from './Command.js';
|
||||
|
||||
interface HelpMessageParams {
|
||||
title: string,
|
||||
@@ -10,7 +10,7 @@ interface HelpMessageParams {
|
||||
}
|
||||
|
||||
class HelpMessage extends Command {
|
||||
constructor(cmdManager: CommandsManager, params: HelpMessageParams, botName?: string) {
|
||||
constructor(cmdManager: CommandManager, params: HelpMessageParams, botName?: string) {
|
||||
super({
|
||||
name: 'help',
|
||||
usage: params.usage,
|
||||
|
||||
Reference in new issue
Block a user