This commit is contained in:
2021-03-04 03:33:54 +03:00
parent 368382f63c
commit 5ac17d713f
67 changed files with 1824 additions and 119 deletions
+20
View File
@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const base_1 = require("../base/base");
const net_1 = require("../base/net");
class Ping {
constructor() {
this.regexp = /^\/ping/i;
}
async execute(context) {
await net_1.sendMessage(context, 'pong').then(async () => {
const nowMillis = new Date().getMilliseconds();
const change = Math.abs(nowMillis - base_1.startTime);
await net_1.sendMessage(context, `ping: ${change} ms`).then(() => {
base_1.setStartTime(0);
});
});
}
}
exports.Ping = Ping;
//# sourceMappingURL=ping.js.map