mirror of
https://github.com/sern-handler/handler
synced 2026-06-06 01:16:55 +00:00
Merge branch 'main' of https://github.com/jacoobes/Sern
This commit is contained in:
@@ -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 }]
|
||||
}
|
||||
}
|
||||
@@ -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)), {})
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user