forked from engineering/cloudservices
15 lines
413 B
TypeScript
15 lines
413 B
TypeScript
import { TCPHandler, Context } from '../../class';
|
|
import { dataConversion } from '../../functions';
|
|
|
|
export default class RAM extends TCPHandler {
|
|
constructor() {
|
|
super();
|
|
this.endpoint = 'ram';
|
|
}
|
|
|
|
public async handle(ctx: Context) {
|
|
const memoryConversion = dataConversion(Number(await ctx.client.util.exec(`memory ${ctx.data.username}`)) * 1000);
|
|
return ctx.send(memoryConversion);
|
|
}
|
|
}
|