15 lines
401 B
TypeScript
15 lines
401 B
TypeScript
import { Handler, Context } from '../class';
|
|
import { dataConversion } from '../functions';
|
|
|
|
export default class RAM extends Handler {
|
|
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);
|
|
}
|
|
}
|