From 46803dfb981a556062300f289b2374cd2cee08c2 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Thu, 20 Sep 2018 20:09:11 +0000 Subject: [PATCH] Remove seconds when not neccessary --- commands/events/time.js | 2 +- commands/info/channel.js | 2 +- commands/info/emoji.js | 2 +- commands/info/role.js | 2 +- commands/info/server.js | 2 +- commands/info/user.js | 4 ++-- commands/search/github.js | 4 ++-- commands/search/kickstarter.js | 4 ++-- commands/search/npm.js | 4 ++-- commands/search/stack-overflow.js | 4 ++-- commands/search/stocks.js | 2 +- commands/search/twitter.js | 2 +- commands/search/wattpad.js | 2 +- commands/search/youtube.js | 2 +- package.json | 2 +- 15 files changed, 20 insertions(+), 20 deletions(-) diff --git a/commands/events/time.js b/commands/events/time.js index 1eeccddd..989d6834 100644 --- a/commands/events/time.js +++ b/commands/events/time.js @@ -28,7 +28,7 @@ module.exports = class TimeCommand extends Command { if (!moment.tz.zone(timeZone)) { return msg.reply('Invalid time zone. Refer to .'); } - const time = moment().tz(timeZone).format('h:mm:ss A'); + const time = moment().tz(timeZone).format('h:mm A'); const location = timeZone.split('/'); const main = firstUpperCase(location[0], /[_ ]/); const sub = location[1] ? firstUpperCase(location[1], /[_ ]/) : null; diff --git a/commands/info/channel.js b/commands/info/channel.js index 5da5f1d1..15c0fc34 100644 --- a/commands/info/channel.js +++ b/commands/info/channel.js @@ -38,7 +38,7 @@ module.exports = class ChannelInfoCommand extends Command { .addField('❯ NSFW', channel.nsfw ? 'Yes' : 'No', true) .addField('❯ Category', channel.parent ? channel.parent.name : 'None', true) .addField('❯ Type', types[channel.type], true) - .addField('❯ Creation Date', moment.utc(channel.createdAt).format('MM/DD/YYYY h:mm:ss A'), true) + .addField('❯ Creation Date', moment.utc(channel.createdAt).format('MM/DD/YYYY h:mm A'), true) .addField('❯ Topic', channel.topic || 'None'); return msg.embed(embed); } diff --git a/commands/info/emoji.js b/commands/info/emoji.js index deef6a93..7e1e0e94 100644 --- a/commands/info/emoji.js +++ b/commands/info/emoji.js @@ -28,7 +28,7 @@ module.exports = class EmojiInfoCommand extends Command { .setThumbnail(emoji.url) .addField('❯ Name', emoji.name, true) .addField('❯ ID', emoji.id, true) - .addField('❯ Creation Date', moment.utc(emoji.createdAt).format('MM/DD/YYYY h:mm:ss A'), true) + .addField('❯ Creation Date', moment.utc(emoji.createdAt).format('MM/DD/YYYY h:mm A'), true) .addField('❯ Animated?', emoji.animated ? 'Yes' : 'No', true); return msg.embed(embed); } diff --git a/commands/info/role.js b/commands/info/role.js index d5dcc5b1..9769e22a 100644 --- a/commands/info/role.js +++ b/commands/info/role.js @@ -31,7 +31,7 @@ module.exports = class RoleInfoCommand extends Command { .addField('❯ Name', role.name, true) .addField('❯ ID', role.id, true) .addField('❯ Color', role.hexColor.toUpperCase(), true) - .addField('❯ Creation Date', moment.utc(role.createdAt).format('MM/DD/YYYY h:mm:ss A'), true) + .addField('❯ Creation Date', moment.utc(role.createdAt).format('MM/DD/YYYY h:mm A'), true) .addField('❯ Hoisted?', role.hoist ? 'Yes' : 'No', true) .addField('❯ Mentionable?', role.mentionable ? 'Yes' : 'No', true) .addField('❯ Permissions', perms.map(perm => permissions[perm]).join(', ') || 'None'); diff --git a/commands/info/server.js b/commands/info/server.js index 96154934..49d55221 100644 --- a/commands/info/server.js +++ b/commands/info/server.js @@ -25,7 +25,7 @@ module.exports = class ServerInfoCommand extends Command { .addField('❯ Name', msg.guild.name, true) .addField('❯ ID', msg.guild.id, true) .addField('❯ Region', msg.guild.region.toUpperCase(), true) - .addField('❯ Creation Date', moment.utc(msg.guild.createdAt).format('MM/DD/YYYY h:mm:ss A'), true) + .addField('❯ Creation Date', moment.utc(msg.guild.createdAt).format('MM/DD/YYYY h:mm A'), true) .addField('❯ Explicit Filter', filterLevels[msg.guild.explicitContentFilter], true) .addField('❯ Verification Level', verificationLevels[msg.guild.verificationLevel], true) .addField('❯ Owner', msg.guild.owner.user.tag, true) diff --git a/commands/info/user.js b/commands/info/user.js index e3864ecb..a853f697 100644 --- a/commands/info/user.js +++ b/commands/info/user.js @@ -34,7 +34,7 @@ module.exports = class UserInfoCommand extends Command { .setThumbnail(user.displayAvatarURL()) .addField('❯ Name', user.tag, true) .addField('❯ ID', user.id, true) - .addField('❯ Discord Join Date', moment.utc(user.createdAt).format('MM/DD/YYYY h:mm:ss A'), true) + .addField('❯ Discord Join Date', moment.utc(user.createdAt).format('MM/DD/YYYY h:mm A'), true) .addField('❯ Bot?', user.bot ? 'Yes' : 'No', true); if (msg.channel.type === 'text') { try { @@ -48,7 +48,7 @@ module.exports = class UserInfoCommand extends Command { .setDescription(member.presence.activity ? `${activities[member.presence.activity.type]} **${member.presence.activity.name}**` : '') - .addField('❯ Server Join Date', moment.utc(member.joinedAt).format('MM/DD/YYYY h:mm:ss A'), true) + .addField('❯ Server Join Date', moment.utc(member.joinedAt).format('MM/DD/YYYY h:mm A'), true) .addField('❯ Nickname', member.nickname || 'None', true) .addField('❯ Highest Role', member.roles.highest.id === msg.guild.defaultRole.id ? 'None' : member.roles.highest.name, true) diff --git a/commands/search/github.js b/commands/search/github.js index 844075e7..9a8d1045 100644 --- a/commands/search/github.js +++ b/commands/search/github.js @@ -47,8 +47,8 @@ module.exports = class GithubCommand extends Command { .addField('❯ Forks', body.forks, true) .addField('❯ Issues', body.open_issues, true) .addField('❯ Language', body.language || '???', true) - .addField('❯ Creation Date', moment.utc(body.created_at).format('MM/DD/YYYY h:mm:ss A'), true) - .addField('❯ Modification Date', moment.utc(body.updated_at).format('MM/DD/YYYY h:mm:ss A'), true); + .addField('❯ Creation Date', moment.utc(body.created_at).format('MM/DD/YYYY h:mm A'), true) + .addField('❯ Modification Date', moment.utc(body.updated_at).format('MM/DD/YYYY h:mm A'), true); return msg.embed(embed); } catch (err) { if (err.status === 404) return msg.say('Could not find any results.'); diff --git a/commands/search/kickstarter.js b/commands/search/kickstarter.js index 6b7d0266..6e7a3dfe 100644 --- a/commands/search/kickstarter.js +++ b/commands/search/kickstarter.js @@ -44,8 +44,8 @@ module.exports = class KickstarterCommand extends Command { .addField('❯ Pledged', `$${data.pledged}`, true) .addField('❯ Backers', data.backers_count, true) .addField('❯ Creator', data.creator.name, true) - .addField('❯ Creation Date', moment.utc(data.created_at * 1000).format('MM/DD/YYYY h:mm:ss A'), true) - .addField('❯ Deadline', moment.utc(data.deadline * 1000).format('MM/DD/YYYY h:mm:ss A'), true); + .addField('❯ Creation Date', moment.utc(data.created_at * 1000).format('MM/DD/YYYY h:mm A'), true) + .addField('❯ Deadline', moment.utc(data.deadline * 1000).format('MM/DD/YYYY h:mm A'), true); return msg.embed(embed); } catch (err) { return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); diff --git a/commands/search/npm.js b/commands/search/npm.js index ed45037a..adbaa457 100644 --- a/commands/search/npm.js +++ b/commands/search/npm.js @@ -41,8 +41,8 @@ module.exports = class NPMCommand extends Command { .addField('❯ Version', body['dist-tags'].latest, true) .addField('❯ License', body.license || 'None', true) .addField('❯ Author', body.author ? body.author.name : '???', true) - .addField('❯ Creation Date', moment.utc(body.time.created).format('MM/DD/YYYY h:mm:ss A'), true) - .addField('❯ Modification Date', moment.utc(body.time.modified).format('MM/DD/YYYY h:mm:ss A'), true) + .addField('❯ Creation Date', moment.utc(body.time.created).format('MM/DD/YYYY h:mm A'), true) + .addField('❯ Modification Date', moment.utc(body.time.modified).format('MM/DD/YYYY h:mm A'), true) .addField('❯ Main File', version.main || 'index.js', true) .addField('❯ Dependencies', dependencies && dependencies.length ? dependencies.join(', ') : 'None') .addField('❯ Maintainers', maintainers.join(', ')); diff --git a/commands/search/stack-overflow.js b/commands/search/stack-overflow.js index 9cd03a91..042e07bf 100644 --- a/commands/search/stack-overflow.js +++ b/commands/search/stack-overflow.js @@ -48,9 +48,9 @@ module.exports = class StackOverflowCommand extends Command { .addField('❯ Asker', `[${data.owner.display_name}](${data.owner.link})`, true) .addField('❯ Views', data.view_count, true) .addField('❯ Score', data.score, true) - .addField('❯ Creation Date', moment.utc(data.creation_date * 1000).format('MM/DD/YYYY h:mm:ss A'), true) + .addField('❯ Creation Date', moment.utc(data.creation_date * 1000).format('MM/DD/YYYY h:mm A'), true) .addField('❯ Last Activity', - moment.utc(data.last_activity_date * 1000).format('MM/DD/YYYY h:mm:ss A'), true); + moment.utc(data.last_activity_date * 1000).format('MM/DD/YYYY h:mm A'), true); return msg.embed(embed); } catch (err) { return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); diff --git a/commands/search/stocks.js b/commands/search/stocks.js index 36b3f533..54f52a9c 100644 --- a/commands/search/stocks.js +++ b/commands/search/stocks.js @@ -44,7 +44,7 @@ module.exports = class StocksCommand extends Command { .addField('❯ High', `$${data['2. high']}`, true) .addField('❯ Low', `$${data['3. low']}`, true) .addField('❯ Last Updated', - moment.utc(body['Meta Data']['3. Last Refreshed']).format('MM/DD/YYYY h:mm:ss A'), true); + moment.utc(body['Meta Data']['3. Last Refreshed']).format('MM/DD/YYYY h:mm A'), true); return msg.embed(embed); } catch (err) { return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); diff --git a/commands/search/twitter.js b/commands/search/twitter.js index df8704a5..d3b5f21c 100644 --- a/commands/search/twitter.js +++ b/commands/search/twitter.js @@ -54,7 +54,7 @@ module.exports = class TwitterCommand extends Command { .addField('❯ Following', body.friends_count, true) .addField('❯ Protected?', body.protected ? 'Yes' : 'No', true) .addField('❯ Verified?', body.verified ? 'Yes' : 'No', true) - .addField('❯ Creation Date', moment.utc(body.created_at).format('MM/DD/YYYY h:mm:ss A'), true) + .addField('❯ Creation Date', moment.utc(body.created_at).format('MM/DD/YYYY h:mm A'), true) .addField('❯ Latest Tweet', latest); return msg.embed(embed); } catch (err) { diff --git a/commands/search/wattpad.js b/commands/search/wattpad.js index 3d857875..44467ae1 100644 --- a/commands/search/wattpad.js +++ b/commands/search/wattpad.js @@ -42,7 +42,7 @@ module.exports = class WattpadCommand extends Command { .setTitle(data.title) .setDescription(shorten(data.description)) .setThumbnail(data.cover) - .addField('❯ Creation Date', moment.utc(data.createDate).format('MM/DD/YYYY h:mm:ss A'), true) + .addField('❯ Creation Date', moment.utc(data.createDate).format('MM/DD/YYYY h:mm A'), true) .addField('❯ Author', data.user.name, true) .addField('❯ Chapters', data.numParts, true) .addField('❯ Reads', data.readCount, true) diff --git a/commands/search/youtube.js b/commands/search/youtube.js index c03dbf2f..fd5e51d0 100644 --- a/commands/search/youtube.js +++ b/commands/search/youtube.js @@ -44,7 +44,7 @@ module.exports = class YoutubeCommand extends Command { .setURL(`https://www.youtube.com/watch?v=${data.id.videoId}`) .setThumbnail(data.snippet.thumbnails.default ? data.snippet.thumbnails.default.url : null) .addField('❯ ID', data.id.videoId, true) - .addField('❯ Publish Date', moment.utc(data.snippet.publishedAt).format('MM/DD/YYYY h:mm:ss A'), true) + .addField('❯ Publish Date', moment.utc(data.snippet.publishedAt).format('MM/DD/YYYY h:mm A'), true) .addField('❯ Channel', data.snippet.channelTitle, true); return msg.embed(embed); } catch (err) { diff --git a/package.json b/package.json index 9a1985f9..201e3340 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "91.8.8", + "version": "91.8.9", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {