From 64c05b0860d527951e326a0b96c60a8440c139e1 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Thu, 25 Oct 2018 00:23:51 +0000 Subject: [PATCH] Fix moment deprecation, don't count categories in channel count --- commands/info/server.js | 2 +- commands/search/twitter.js | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/info/server.js b/commands/info/server.js index d72b0f07..aa428b55 100644 --- a/commands/info/server.js +++ b/commands/info/server.js @@ -31,7 +31,7 @@ module.exports = class ServerInfoCommand extends Command { .addField('❯ Owner', msg.guild.owner.user.tag, true) .addField('❯ Members', msg.guild.memberCount, true) .addField('❯ Roles', msg.guild.roles.size, true) - .addField('❯ Channels', msg.guild.channels.size, true); + .addField('❯ Channels', msg.guild.channels.filter(channel => channel.type !== 'category').size, true); return msg.embed(embed); } }; diff --git a/commands/search/twitter.js b/commands/search/twitter.js index 60ba85f2..603cd5b2 100644 --- a/commands/search/twitter.js +++ b/commands/search/twitter.js @@ -54,7 +54,7 @@ module.exports = class TwitterCommand extends Command { .addField('❯ Following', formatNumber(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 A'), true) + .addField('❯ Creation Date', moment.utc(new Date(body.created_at)).format('MM/DD/YYYY h:mm A'), true) .addField('❯ Latest Tweet', latest); return msg.embed(embed); } catch (err) { diff --git a/package.json b/package.json index 13645c08..9ca0a3b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "95.1.11", + "version": "95.1.12", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {