style: reformatted code a lil bit
This commit is contained in:
parent
727ac245ff
commit
d57e14a3af
4 changed files with 11 additions and 4 deletions
6
.idea/jsLinters/eslint.xml
Normal file
6
.idea/jsLinters/eslint.xml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="EslintConfiguration">
|
||||||
|
<option name="fix-on-save" value="true" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -19,12 +19,12 @@ import type { ICommandOptions } from '@utils/types';
|
||||||
|
|
||||||
export default abstract class Command {
|
export default abstract class Command {
|
||||||
public readonly client: Client;
|
public readonly client: Client;
|
||||||
public readonly options: ICommandOptions
|
public readonly options: ICommandOptions;
|
||||||
|
|
||||||
public constructor(client: Client, options: ICommandOptions) {
|
public constructor(client: Client, options: ICommandOptions) {
|
||||||
this.client = client;
|
this.client = client;
|
||||||
this.options = options;
|
this.options = options;
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract run(message: Message, ...args:string[]): void;
|
public abstract run(message: Message, ...args: string[]): void;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ let warnLevel = false;
|
||||||
let errorLevel = false;
|
let errorLevel = false;
|
||||||
let fatalLevel = false;
|
let fatalLevel = false;
|
||||||
|
|
||||||
switch ((config.get('logLevel') as string).toLowerCase()) {
|
switch ((config.get('logLevel') as string).toLowerCase()) {
|
||||||
case 'verbose':
|
case 'verbose':
|
||||||
verboseLevel = true;
|
verboseLevel = true;
|
||||||
debugLevel = true;
|
debugLevel = true;
|
||||||
|
@ -83,7 +83,7 @@ export function debug(message: string, scope?: ELoggingScope): void {
|
||||||
const splitMultiline = message.split('\n');
|
const splitMultiline = message.split('\n');
|
||||||
|
|
||||||
splitMultiline.forEach((val) => {
|
splitMultiline.forEach((val) => {
|
||||||
if(debugLevel)
|
if(debugLevel)
|
||||||
if(scope)
|
if(scope)
|
||||||
console.log(chalk`{grey (${date})} {magenta.bold ${scope}} {blue.bold [DEBUG]}: {blue ${val}}`);
|
console.log(chalk`{grey (${date})} {magenta.bold ${scope}} {blue.bold [DEBUG]}: {blue ${val}}`);
|
||||||
else
|
else
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with ArgonBot. If not, see <https: //www.gnu.org/licenses/>.
|
* along with ArgonBot. If not, see <https: //www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//Enums
|
//Enums
|
||||||
export enum ELoggingScope {
|
export enum ELoggingScope {
|
||||||
Startup = 'STARTUP',
|
Startup = 'STARTUP',
|
||||||
|
|
Reference in a new issue