use native discord timestamps
This commit is contained in:
parent
548ae6fab2
commit
ac811afc44
4 changed files with 4 additions and 18 deletions
|
@ -80,7 +80,7 @@ module.exports = class Avatar extends Command {
|
||||||
name: 'Roles', value: roles.size.toString(), inline: true
|
name: 'Roles', value: roles.size.toString(), inline: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Created', value: time(guild.createdAt, 'D') + `, ${time(guild.createdAt, 'R')}`, inline: true
|
name: 'Created', value: time(guild.createdAt, 'D') + time(guild.createdAt, 'R'), inline: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Features', value: guild.features.join(', ')
|
name: 'Features', value: guild.features.join(', ')
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
const Command = require('../../base/Command.js');
|
const Command = require('../../base/Command.js');
|
||||||
const dayjs = require('dayjs');
|
const { time } = require('discord.js');
|
||||||
dayjs.extend(require('dayjs/plugin/relativeTime'));
|
|
||||||
|
|
||||||
module.exports = class Avatar extends Command {
|
module.exports = class Avatar extends Command {
|
||||||
constructor (name, category) {
|
constructor (name, category) {
|
||||||
super (name, category);
|
super (name, category);
|
||||||
|
@ -57,10 +55,10 @@ module.exports = class Avatar extends Command {
|
||||||
name: 'Roles:', value: roles.join(' ')
|
name: 'Roles:', value: roles.join(' ')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Joined Server', value: `${dayjs(member.joinedAt).format('D/M/YYYY HH:mm (UTCZ)')}\n*${dayjs().to(member.joinedAt)}*`, inline: true
|
name: 'Joined Server', value: time(member.joinedAt, 'D') + time(member.joinedAt, 'R'), inline: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Joined Discord', value: `${dayjs(member.user.createdAt).format('D/M/YYYY HH:mm (UTCZ)')}\n*${dayjs().to(member.user.createdAt)}*`, inline: true
|
name: 'Joined Discord', value: time(user.createdAt, 'D') + time(user.createdAt, 'R'), inline: true
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
if (badges.length > 0) {
|
if (badges.length > 0) {
|
||||||
|
|
11
package-lock.json
generated
11
package-lock.json
generated
|
@ -12,7 +12,6 @@
|
||||||
"@sentry/node": "^7.23.0",
|
"@sentry/node": "^7.23.0",
|
||||||
"bufferutil": "^4.0.3",
|
"bufferutil": "^4.0.3",
|
||||||
"chalk": "^4.1.2",
|
"chalk": "^4.1.2",
|
||||||
"dayjs": "^1.10.6",
|
|
||||||
"discord.js": "^14.7.1",
|
"discord.js": "^14.7.1",
|
||||||
"erlpack": "^0.1.3",
|
"erlpack": "^0.1.3",
|
||||||
"eslint": "^8.29.0",
|
"eslint": "^8.29.0",
|
||||||
|
@ -459,11 +458,6 @@
|
||||||
"node": ">= 8"
|
"node": ">= 8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/dayjs": {
|
|
||||||
"version": "1.11.6",
|
|
||||||
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.6.tgz",
|
|
||||||
"integrity": "sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ=="
|
|
||||||
},
|
|
||||||
"node_modules/debug": {
|
"node_modules/debug": {
|
||||||
"version": "4.3.4",
|
"version": "4.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||||
|
@ -2087,11 +2081,6 @@
|
||||||
"which": "^2.0.1"
|
"which": "^2.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dayjs": {
|
|
||||||
"version": "1.11.6",
|
|
||||||
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.6.tgz",
|
|
||||||
"integrity": "sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ=="
|
|
||||||
},
|
|
||||||
"debug": {
|
"debug": {
|
||||||
"version": "4.3.4",
|
"version": "4.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
"@sentry/node": "^7.23.0",
|
"@sentry/node": "^7.23.0",
|
||||||
"bufferutil": "^4.0.3",
|
"bufferutil": "^4.0.3",
|
||||||
"chalk": "^4.1.2",
|
"chalk": "^4.1.2",
|
||||||
"dayjs": "^1.10.6",
|
|
||||||
"discord.js": "^14.7.1",
|
"discord.js": "^14.7.1",
|
||||||
"erlpack": "^0.1.3",
|
"erlpack": "^0.1.3",
|
||||||
"eslint": "^8.29.0",
|
"eslint": "^8.29.0",
|
||||||
|
|
Loading…
Reference in a new issue