This commit is contained in:
xxDeveloper
2022-02-13 22:36:23 +03:00
3 changed files with 10 additions and 11 deletions

View File

@@ -3,6 +3,7 @@
"extends": ["plugin:@typescript-eslint/recommended"],
"parserOptions": { "ecmaVersion": "esnext", "sourceType": "" },
"rules": {
"@typescript-eslint/no-non-null-assertion": "off"
"@typescript-eslint/no-non-null-assertion": "off",
"quotes": [2, "single", { "avoidEscape": true, "allowTemplateLiterals" : true }]
}
}

View File

@@ -1,7 +1,6 @@
import dayJS from 'dayjs';
import Timezone from 'dayjs/plugin/timezone';
import UTC from 'dayjs/plugin/timezone';
enum sEvent {
GLOBAL_SLASH,
LOCAL_SLASH,
@@ -20,12 +19,11 @@ export default class Logger {
console.log(`[${`${tz}`}][${sEvent[e]}] :: ${message}`);
}
public tableRam() {
throw Error('unimpl');
console.table(
Object.values(process.memoryUsage())
.map(([k,v]) => { return {[k] : `${(Math.round(v) / 1024 / 1024 * 100) / 100}`} })
.reduce(((r, c) => Object.assign(r, c)), {}))
}
public tableRam() {
console.table(
Object.entries(process.memoryUsage())
.map(([k, v] : [string, number]) => { return {[k] : ((Math.round(v) / 1024 / 1024 * 100) / 100).toFixed(2) }})
.reduce(((r, c) => Object.assign(r, c)), {})
)
}
}

View File

@@ -50,7 +50,7 @@ export class Handler {
new Logger().tableRam();
})
.on('messageCreate', async (message: any) => {
.on('messageCreate', async (message: Message) => {
if (isBot(message) || !hasPrefix(message, this.prefix)) return;
if (message.channel.type === 'DM') return; // TODO: Handle dms