Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
you can use the property - it returns the time in milliseconds elapsed since the bot last entered the state (i.e. the time elapsed since the bot was last launched):
if you want to know the creation date of the bot's account, you can use the property :
if you want to know when any of the files have been created, you can use the function : .uptime
READY
var creationDate = Date.now() - client.uptime;
var creationDate = client.user.createdAt;
var fs = require('fs');
fs.stat('путь_к_файлу', (err, stat) => {
if(err) throw(err);
var creationDate = stat.birthtime; // ( * )
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question