6 |
import MessageEmbed from '../../client/MessageEmbed'; |
import MessageEmbed from '../../client/MessageEmbed'; |
7 |
import { fetchEmoji } from '../../utils/Emoji'; |
import { fetchEmoji } from '../../utils/Emoji'; |
8 |
import { timeProcess } from '../../utils/util'; |
import { timeProcess } from '../../utils/util'; |
9 |
|
import { formatDistanceStrict, formatDistanceToNowStrict, formatDuration, intervalToDuration } from 'date-fns'; |
10 |
|
|
11 |
export default class SystemCommand extends BaseCommand { |
export default class SystemCommand extends BaseCommand { |
12 |
constructor() { |
constructor() { |
55 |
apiLatencyIcon = '🟡'; |
apiLatencyIcon = '🟡'; |
56 |
} |
} |
57 |
|
|
58 |
const memoryFree = Math.round(process.memoryUsage().heapUsed / 1024 / 1024 * 100) / 100; |
const memoryFree = Math.round((process.memoryUsage().heapUsed / 1024 / 1024 * 100) / 100); |
59 |
|
|
60 |
const msgoptions: any = { |
const msgoptions: any = { |
61 |
embeds: [ |
embeds: [ |
72 |
}, |
}, |
73 |
{ |
{ |
74 |
name: 'Uptime', |
name: 'Uptime', |
75 |
value: `${timeProcess(parseInt(process.uptime().toFixed(2)))}` |
value: `${formatDuration(intervalToDuration({ |
76 |
|
start: 0, |
77 |
|
end: process.uptime() * 1000 |
78 |
|
}))}` |
79 |
}, |
}, |
80 |
{ |
{ |
81 |
name: 'Latency', |
name: 'Latency', |