mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 14:19:11 +02:00
NPM Bug-Fixes
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
const Command = require('../../structures/Command');
|
const Command = require('../../structures/Command');
|
||||||
const { MessageEmbed } = require('discord.js');
|
const { MessageEmbed } = require('discord.js');
|
||||||
const snekfetch = require('snekfetch');
|
const snekfetch = require('snekfetch');
|
||||||
|
const moment = require('moment');
|
||||||
|
|
||||||
module.exports = class NPMCommand extends Command {
|
module.exports = class NPMCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
@@ -37,8 +38,12 @@ module.exports = class NPMCommand extends Command {
|
|||||||
body.license || 'None', true)
|
body.license || 'None', true)
|
||||||
.addField('❯ Author',
|
.addField('❯ Author',
|
||||||
body.author ? body.author.name : 'Unknown', true)
|
body.author ? body.author.name : 'Unknown', true)
|
||||||
|
.addField('❯ Created',
|
||||||
|
moment(body.time.created).format('MMMM Do YYYY'), true)
|
||||||
|
.addField('❯ Modified',
|
||||||
|
moment(body.time.modified).format('MMMM Do YYYY'), true)
|
||||||
.addField('❯ Keywords',
|
.addField('❯ Keywords',
|
||||||
body.keywords ? body.keywords.join(', ') : 'None')
|
body.keywords.length ? body.keywords.join(', ') : 'None')
|
||||||
.addField('❯ Maintainers',
|
.addField('❯ Maintainers',
|
||||||
body.maintainers.map((user) => user.name).join(', '));
|
body.maintainers.map((user) => user.name).join(', '));
|
||||||
return msg.embed(embed);
|
return msg.embed(embed);
|
||||||
|
|||||||
Reference in New Issue
Block a user