Show how long a call lasted at the end

This commit is contained in:
Dragon Fire
2020-07-07 11:08:47 -04:00
parent 0b8b543cc9
commit 2b690f56ff
3 changed files with 12 additions and 8 deletions
+1 -3
View File
@@ -1,7 +1,5 @@
const Command = require('../../structures/Command');
const { MessageEmbed } = require('discord.js');
const moment = require('moment');
require('moment-duration-format');
module.exports = class PhoneInfoCommand extends Command {
constructor(client) {
@@ -28,7 +26,7 @@ module.exports = class PhoneInfoCommand extends Command {
.addField(' Recipient Channel', `#${otherChannel.name}`, true)
.addField(' Recipient Server', otherChannel.guild.name, true)
.addField(' Recipient ID', otherChannel.id, true)
.addField(' Call Duration', moment.duration(Date.now() - call.timeStarted).format('hh[h]mm[m]ss[s]'), true)
.addField(' Call Duration', call.durationDisplay, true)
.addField(' Admin Call?', call.ownerOrigin ? 'Yes' : 'No', true)
.addField(' Started By', call.startUser.tag, true);
return msg.embed(embed);