From 9913d7b89548fa900dc0137fe2bc9547b910cf9e Mon Sep 17 00:00:00 2001 From: Killian Date: Thu, 27 Aug 2020 17:53:46 +0200 Subject: [PATCH] Now give the real ping --- Commands/Bot/ping.js | 10 ++++++---- README.md | 2 +- package.json | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Commands/Bot/ping.js b/Commands/Bot/ping.js index cb29052..511616e 100644 --- a/Commands/Bot/ping.js +++ b/Commands/Bot/ping.js @@ -4,7 +4,7 @@ module.exports = class extends Command { constructor(client) { super(client, { name: "ping", - description: "Return the bot ping (just a test command for now until the real ping is added)", + description: "Return the bot ping.", category: "Bot", enabled: true, aliases: ["latency"], @@ -14,7 +14,9 @@ module.exports = class extends Command { } async run(message, args) { - message.chat.sendMessage(`Hey, my name is ${this.client.user.fullName} and i am an instagram bot.`); + message.chat.sendMessage('Calcul du ping...').then(m => { + m.delete(); + message.chat.sendMessage(`Mon ping est de ${(m.timestamp - message.timestamp) / 1000}ms`) + }) } -} - +} \ No newline at end of file diff --git a/README.md b/README.md index 11e94b0..6fc86b4 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ it means that the bot is ready to be used. šŸŽ‰ # Available commands -- !ping +- !ping: Return the bot ping # Future updates diff --git a/package.json b/package.json index 5555b4c..8b99bfd 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "author": "MrĀ¤KayJayDee (https://github.com/Mr-KayJayDee)", "license": "MIT", "dependencies": { - "@androz2091/insta.js": "github:androz2091/insta.js", + "@androz2091/insta.js": "github:androz2091/insta.js#develop", "@discordjs/collection": "^0.1.6", "chalk": "^4.1.0", "dotenv": "^8.2.0"