From 733aa33f21245c95c17f7697232a0186fd1a46d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Bersier?= Date: Thu, 20 Jun 2019 22:33:59 +0200 Subject: [PATCH 1/5] show number of users and bots --- commands/utility/server.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/commands/utility/server.js b/commands/utility/server.js index 741d8c7e..0f212154 100644 --- a/commands/utility/server.js +++ b/commands/utility/server.js @@ -37,8 +37,11 @@ class ServerCommand extends Command { .setColor('#0099ff') .setTitle(message.guild.name) .setThumbnail(message.guild.iconURL()) - .addField('Member', message.guild.memberCount, true) + .addField('Numbers of users', message.guild.members.filter(member => !member.user.bot).size, true) + .addField('Numbers of bots', message.guild.members.filter(member => member.user.bot).size, true) + .addField('Total numbers of members', message.guild.memberCount, true) .addField('Numbers of channel', message.guild.channels.size, true) + .addBlankField() .addField('Date when guild created', message.guild.createdAt, true) .addField('Owner', message.guild.owner, true) .addField('Numbers of tag', count, true) From 9fd6104fc6bd05d8e2c8600adf8f4dac7c765c3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Bersier?= Date: Thu, 20 Jun 2019 22:34:02 +0200 Subject: [PATCH 2/5] Number of users => Numbers of users --- event/listeners/guildCreate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/event/listeners/guildCreate.js b/event/listeners/guildCreate.js index d0150087..e4233a55 100644 --- a/event/listeners/guildCreate.js +++ b/event/listeners/guildCreate.js @@ -22,7 +22,7 @@ class guildCreateListener extends Listener { .addField('Guild name', guild.name, true) .addField('Guild ID', guild.id, true) .addField('Total numbers of members', guild.memberCount, true) - .addField('Number of users', guild.members.filter(member => !member.user.bot).size, true) + .addField('Numbers of users', guild.members.filter(member => !member.user.bot).size, true) .addField('Numbers of bot', guild.members.filter(member => member.user.bot).size, true) .addField('Owner', guild.owner.user.username, true) .addField('Owner ID', guild.owner.id, true) From 84ef4456de500173adbc4e6b8f7a9593e61e077f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Bersier?= Date: Fri, 21 Jun 2019 03:25:16 +0200 Subject: [PATCH 3/5] whois --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index e5d25601..0c8b99b3 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "reload-json": "^0.3.1", "superagent": "^4.1.0", "twitter-lite": "^0.9.4", + "whois": "^2.10.0", "youtube-dl": "^1.13.1", "ytdl-core": "^0.29.1" }, From fb780ccee1e7428f868acf3de2c48951d3ead3ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Bersier?= Date: Fri, 21 Jun 2019 03:25:22 +0200 Subject: [PATCH 4/5] Show's website whois --- commands/utility/whois.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 commands/utility/whois.js diff --git a/commands/utility/whois.js b/commands/utility/whois.js new file mode 100644 index 00000000..0a2193f0 --- /dev/null +++ b/commands/utility/whois.js @@ -0,0 +1,31 @@ +const { Command } = require('discord-akairo'); +const whois = require('whois'); + +class whoisCommand extends Command { + constructor() { + super('whois', { + aliases: ['whois'], + category: 'utility', + args: [ + { + id: 'domain', + type: 'string', + match: 'rest', + } + ], + description: { + content: 'Show\'s whois data about website. (ATTENTION, CAN BE SPAMMY)', + usage: '[website]', + examples: ['namejeff.xyz'] + } + }); + } + + async exec(message, args) { + whois.lookup(args.domain, function(err, data) { + return message.channel.send(data, {split: true, code: true }); + }); + } +} + +module.exports = whoisCommand; \ No newline at end of file From 22638f433e0d5bc995644b0e3f50686ada85751f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Bersier?= Date: Fri, 21 Jun 2019 03:35:21 +0200 Subject: [PATCH 5/5] removed whois because it can stuck the bot --- commands/utility/whois.js | 31 ------------------------------- package.json | 1 - 2 files changed, 32 deletions(-) delete mode 100644 commands/utility/whois.js diff --git a/commands/utility/whois.js b/commands/utility/whois.js deleted file mode 100644 index 0a2193f0..00000000 --- a/commands/utility/whois.js +++ /dev/null @@ -1,31 +0,0 @@ -const { Command } = require('discord-akairo'); -const whois = require('whois'); - -class whoisCommand extends Command { - constructor() { - super('whois', { - aliases: ['whois'], - category: 'utility', - args: [ - { - id: 'domain', - type: 'string', - match: 'rest', - } - ], - description: { - content: 'Show\'s whois data about website. (ATTENTION, CAN BE SPAMMY)', - usage: '[website]', - examples: ['namejeff.xyz'] - } - }); - } - - async exec(message, args) { - whois.lookup(args.domain, function(err, data) { - return message.channel.send(data, {split: true, code: true }); - }); - } -} - -module.exports = whoisCommand; \ No newline at end of file diff --git a/package.json b/package.json index 0c8b99b3..e5d25601 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,6 @@ "reload-json": "^0.3.1", "superagent": "^4.1.0", "twitter-lite": "^0.9.4", - "whois": "^2.10.0", "youtube-dl": "^1.13.1", "ytdl-core": "^0.29.1" },