mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-22 15:53:08 +02:00
feat: new suid-time
stdin command
This commit is contained in:
parent
e8b95a2f31
commit
ff8e66638a
23
src/stdin/suid-time.js
Normal file
23
src/stdin/suid-time.js
Normal file
@ -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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user