Command system (not tested)

This commit is contained in:
mmacierzanka committed 2021-06-19 20:15:27 +02:00
1 parent 23077912e3
commit c35c23d6da
3 files changed
+133 -20

No files matched your search

+38
View File
@@ -0,0 +1,38 @@
//IMPORTS
import { Client, ClientOptions } from 'discord.js';
import { CommandsManager } from './Commands';
//TYPE DEFINITIONS
interface ConfigurationOptions {
prefix: string,
accentColor: string
}
interface ConstructorOptions {
name: string,
prefix: string,
helpCommand?: boolean,
clientOptions?: ClientOptions,
token?: string
}
//MAIN CLASS
class Bot {
name: string;
client: Client;
commands: CommandsManager;
config: ConfigurationOptions;
constructor(options: ConstructorOptions) {
this.name = options.name;
this.client = new Client(options.clientOptions);
this.commands = new CommandsManager();
this.config = {
prefix: options.prefix,
accentColor: "#000"
}
}
}
//EXPORTS
export default Bot;
export { Bot };