diff --git a/src/stdin/suid-time.js b/src/stdin/suid-time.js new file mode 100644 index 0000000..973aed1 --- /dev/null +++ b/src/stdin/suid-time.js @@ -0,0 +1,23 @@ +const { StdinCommand } = require('@eartharoid/dbf'); +const ShortUniqueId = require('short-unique-id'); +const uid = new ShortUniqueId(); + +module.exports = class extends StdinCommand { + constructor(client, options) { + super(client, { + ...options, + id: 'suid-time', + }); + } + + async run(input) { + try { + input = input.filter(str => str.length > 0); + this.client.log.info('Timestamp:', uid.parseStamp(input[0])); + } catch (error) { + this.client.log.error(error); + } + } +}; + +