Made a lot of things

This commit is contained in:
ahoZiorce
2018-07-02 17:44:37 +02:00
parent 6ecb727ff3
commit 4caefcdfd7
9 changed files with 436 additions and 28 deletions

View File

@@ -7,5 +7,12 @@ exports.loadModule = function loadModule () {
});
commandH.endpoint('^ping (.*)$', (match, message) => {
bot.createMessage(message.channel.id, 'Pong : ' + match[1]);
let time = new Date();
bot.once('messageCreate', (msg) => {
let ms = new Date().getTime() - time.getTime();
if (msg.channel !== message.channel) return;
if (msg.author !== bot.user) return;
bot.createMessage(msg.channel.id, ms + ' ms');
});
});
}
};