From 3baacd92ddb1b89f238ad69e74e00b11edeb2cd5 Mon Sep 17 00:00:00 2001 From: LauraOrchid Date: Sat, 23 Jul 2022 13:10:45 +0000 Subject: [PATCH] Add 'commands/Info/uptime.js' --- commands/Info/uptime.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 commands/Info/uptime.js diff --git a/commands/Info/uptime.js b/commands/Info/uptime.js new file mode 100644 index 0000000..e84aecf --- /dev/null +++ b/commands/Info/uptime.js @@ -0,0 +1,17 @@ +const { EmbedBuilder } = require('discord.js'); +const decodeTime = require('format-duration'); + +module.exports = { + name: "uptime", + description: "Obtain bot's uptime", + + run: async (client, interaction) => { + const embed = new EmbedBuilder() + .setColor("#FA0CF2") + .setTitle("🕒 Laura's Uptime is...") + .setDescription(`${decodeTime(client.uptime)}`) + .setTimestamp() + .setFooter({ text: `Requested by ${interaction.user.tag}`, iconURL: `${interaction.user.displayAvatarURL()}` }); + interaction.followUp({ embeds: [embed] }); + }, +}; \ No newline at end of file