UNPKG

webhok

Version:

An under-maintenance webhook client for discord to assist you into sending requests to webhooks.

23 lines (22 loc) 667 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Helper = void 0; class Helper { static formatTime(seconds) { const hours = Math.floor(seconds / 3600); const minutes = Math.floor((seconds % 3600) / 60); const remainingSeconds = seconds % 60; let formattedTime = ''; if (hours > 0) { formattedTime += hours + 'h '; } if (minutes > 0) { formattedTime += minutes + 'm '; } if (remainingSeconds > 0) { formattedTime += remainingSeconds + 's'; } return formattedTime.trim(); } } exports.Helper = Helper;