mirror of
https://github.com/sern-handler/handler
synced 2026-06-27 18:22:14 +00:00
eslint fix and tableRam
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import dayjs from "dayjs";
|
||||
import timezone from "dayjs/plugin/timezone";
|
||||
import utc from "dayjs/plugin/timezone";
|
||||
import dayjs from 'dayjs';
|
||||
import timezone from 'dayjs/plugin/timezone';
|
||||
import utc from 'dayjs/plugin/timezone';
|
||||
|
||||
enum sEvent {
|
||||
GLOBAL_SLASH,
|
||||
@@ -22,10 +22,9 @@ export default class Logger {
|
||||
}
|
||||
|
||||
public tableRam() {
|
||||
throw Error("unimpl")
|
||||
console.table(
|
||||
Object.values(process.memoryUsage())
|
||||
.map(([k,v]) => { return {[k] : `${(Math.round(v) / 1024 / 1024 * 100) / 100}`} })
|
||||
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)), {})
|
||||
)
|
||||
}
|
||||
|
||||
@@ -51,7 +51,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