From 36a4c146a13fa9ac657d0b9d65fdc8be6d3f0d44 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Tue, 9 Oct 2018 11:23:28 +0200 Subject: [PATCH 1/6] More clap --- commands/fun/clap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/fun/clap.js b/commands/fun/clap.js index b184194..ac00784 100644 --- a/commands/fun/clap.js +++ b/commands/fun/clap.js @@ -19,5 +19,5 @@ module.exports = class clapCommand extends Command { async run(message, { text }) { let clap = text.replace(/ /g, ' 👏 '); message.delete(); - message.say(clap); + message.say(`👏 ${clap} 👏`); }}; \ No newline at end of file From ad1cf3c31767b3ef367bf7b1c0a26d56dfbdef2f Mon Sep 17 00:00:00 2001 From: loicbersier Date: Tue, 9 Oct 2018 11:57:05 +0200 Subject: [PATCH 2/6] removed fortnite --- json/reply.json | 1 - 1 file changed, 1 deletion(-) diff --git a/json/reply.json b/json/reply.json index c46d894..16402b6 100644 --- a/json/reply.json +++ b/json/reply.json @@ -13,7 +13,6 @@ "congratulations": "https://www.youtube.com/watch?v=1Bix44C1EzY", "ligma": "haha ligma BALLS XDDDDDD man this is so funny XDDDDDDDDDDDDDDDD are u sugondese too ? HAHAHHAHAHHAXDDDDDDDDDDDDDDDDDDD SUGONDESENUT AMIRITE", "september": "september, do you remember?", - "fortnite": "are you like fucking retarded?", "?!?!!!??!": "Special thanks to [TG/LW] Caramel#5861 for inspiring me to make this bot and to you the one that found that secret ( not if you found it through my gitlab )", "okay": "Now THIS is epic", "ok n": "igger", From ff793521667220edf61e0961e68aa2764d105674 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Tue, 9 Oct 2018 15:08:58 +0200 Subject: [PATCH 3/6] Removed one ugly clap --- commands/fun/clap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/fun/clap.js b/commands/fun/clap.js index ac00784..d814469 100644 --- a/commands/fun/clap.js +++ b/commands/fun/clap.js @@ -19,5 +19,5 @@ module.exports = class clapCommand extends Command { async run(message, { text }) { let clap = text.replace(/ /g, ' 👏 '); message.delete(); - message.say(`👏 ${clap} 👏`); + message.say(`${clap} 👏`); }}; \ No newline at end of file From a459aa5456b68d4099cd7d4b61ed4c240c2e4bcb Mon Sep 17 00:00:00 2001 From: loicbersier Date: Tue, 9 Oct 2018 15:20:28 +0200 Subject: [PATCH 4/6] Removed useless command --- commands/utility/listemote.js | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 commands/utility/listemote.js diff --git a/commands/utility/listemote.js b/commands/utility/listemote.js deleted file mode 100644 index 4379807..0000000 --- a/commands/utility/listemote.js +++ /dev/null @@ -1,16 +0,0 @@ -const { Command } = require('discord.js-commando'); -module.exports = class listEmoteCommand extends Command { - constructor(client) { - super(client, { - name: 'listemote', - group: 'utility', - memberName: 'listemote', - description: `List the emotes available on the server`, - }); - } - - async run(message) { - const emojiList = message.guild.emojis.map((e, x) => (x + ' = ' + e) + ' | ' +e.name).join('\n'); - message.channel.send(emojiList); - } -}; \ No newline at end of file From 1c165ed28bc7246cd3dd8baefad7604254176941 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Tue, 9 Oct 2018 15:47:20 +0200 Subject: [PATCH 5/6] better visibility in the console when bot get kicked --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index b256c76..b458d52 100644 --- a/index.js +++ b/index.js @@ -66,6 +66,7 @@ client.registry .setDescription(`${guild.name}\n${guild.id}\n${guild.memberCount} users\nOwner: ${guild.owner.user.username}\n(${guild.owner})`) .setTimestamp() + console.log('***BOT KICKED***') channel.send({ embed: kickEmbed }); }); From 5a750c99512a8675eb25c45538c9356d3a72d5bd Mon Sep 17 00:00:00 2001 From: loicbersier Date: Tue, 9 Oct 2018 16:31:23 +0200 Subject: [PATCH 6/6] Changed ping a little --- commands/utility/ping.js | 34 ++++++++++++++++++++++++++++++++++ index.js | 3 ++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 commands/utility/ping.js diff --git a/commands/utility/ping.js b/commands/utility/ping.js new file mode 100644 index 0000000..4cffe9f --- /dev/null +++ b/commands/utility/ping.js @@ -0,0 +1,34 @@ +const { oneLine } = require('common-tags'); +const { Command } = require('discord.js-commando'); + +module.exports = class PingCommand extends Command { + constructor(client) { + super(client, { + name: 'ping', + group: 'util', + memberName: 'ping', + description: 'Checks the bot\'s ping to the Discord server.', + throttling: { + usages: 5, + duration: 10 + } + }); + } + + async run(msg) { + if(!msg.editable) { + const pingMsg = await msg.say('Pinging...'); + return pingMsg.edit(oneLine` + ${msg.channel.type !== 'dm' ? `${msg.author},` : ''} + <:ping:499226870047571978> Pong! The message round-trip took **${pingMsg.createdTimestamp - msg.createdTimestamp}**ms. + ${this.client.ping ? `The heartbeat ping is **${Math.round(this.client.ping)}**ms.` : ''} + `); + } else { + await msg.edit('Pinging...'); + return msg.edit(oneLine` + Pong! The message round-trip took **${msg.editedTimestamp - msg.createdTimestamp}**ms. + ${this.client.ping ? `The heartbeat ping is **${Math.round(this.client.ping)}**ms.` : ''} + `); + } + } +}; diff --git a/index.js b/index.js index b458d52..66d3241 100644 --- a/index.js +++ b/index.js @@ -25,7 +25,8 @@ client.registry ]) .registerDefaultGroups() .registerDefaultCommands({ - help: false + help: false, + ping: false }) .registerCommandsIn(path.join(__dirname, 'commands')); // Ready messages