Refactor floating code to OOP by JS ES6. Refator following: - [x] Core - [x] PluginRegistry - [x] Separate logEvent() to own class and refactor - [ ] Plugin API - [ ] Plugins must have function init() as mandatory - [ ] init() has no madatory parameters - [ ] Remove stats from core and: - [ ] commandHandled counter in Commander class as read-only property - [ ] Reconnect counter in Core class as read-only property - [ ] Remove deprecated methods and properties - [x] Separate built-in commands to own js files - [x] Refactor logger - [x] Write derive() function for logger derivation - [ ] Access all classes by purrplingbot.js instead of instance of core - [ ] Instance of core placed in modules.exports.INSTANCE. This property may not exists if no instance created. - [x] Move global constants to separated file constants.js
Refactor floating code to OOP by JS ES6. Refator following: