Answer the question
In order to leave comments, you need to log in
Invalid Date after command. What to do?
module.exports.run = async (bot, message, args) => {
if (!args[0]) {
let status = ''
switch (message.author.presence.status) {
case 'online':
status = ':green_circle: Онлайн';
break;
case 'idle':
status = ':orange_circle: Нет на месте';
break;
case 'offline':
status = ':black_circle: Нет в сети';
break;
case 'dnd':
status = ':red_circle: Не беспокоить';
break;
}
const embed = new Discord.MessageEmbed()
.setTitle('**Информация о данном пользователе**')
.setFooter('Команда .user')
.setColor('#027ec2')
.setTimestamp()
.setThumbnail(message.author.avatarURL())
.addFields({
name: '**NickName:**',
value: `${message.author.tag}`,
inline: true
}, {
name: '**Discord ID:**',
value: `${message.author.id}`,
inline: true
}, {
name: '**Статус:**',
value: `${status}`,
inline: false
}, {
name: '**Дата создания аккаунта:**',
value: `${message.author.createdAt.toLocaleDateString()}`,
inline: false
}, {
name: '**Дата входа на сервер**',
value: `${message.member.joinedAt.toLocaleDateString()}`,
inline: true
}, )
message.channel.send(embed)
} else {
let rUser = message.mentions.users.first()
let statuss = ''
switch (rUser.presence.status) {
case 'online':
statuss = ':green_circle: Онлайн';
break;
case 'idle':
statuss = ':orange_circle: Нет на месте';
break;
case 'offline':
statuss = ':black_circle: Нет в сети';
break;
case 'dnd':
statuss = ':red_circle: Не беспокоить';
break;
}
const membed = new Discord.MessageEmbed()
.setTitle('**Информация о данном пользователе**')
.setFooter('Команда .user @упоминание')
.setColor('#027ec2')
.setTimestamp()
.setThumbnail(rUser.avatarURL())
.addFields({
name: '**NickName:**',
value: `${rUser.tag}`,
inline: true
}, {
name: '**Discord ID:**',
value: `${rUser.id}`,
inline: true
}, {
name: '**Статус:**',
value: `${statuss}`,
inline: false
}, {
name: '**Дата создания аккаунта:**',
value: `${rUser.createdAt.toLocaleDateString()}`,
inline: false
}, {
name: '**Дата входа на сервер**',
value: `${new Date(rUser.joinedAt).toLocaleDateString()}`,
inline: true
}, )
message.channel.send(membed)
}
}
module.exports.help = {
name: "user",
category: "global",
aliases: ["user"],
usage: 'user',
descreption: 'Проверка профиля'
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question