diff --git a/commands/fun/clap.js b/commands/fun/clap.js index b184194..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 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 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 b256c76..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 @@ -66,6 +67,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 }); }); diff --git a/json/reply.json b/json/reply.json index 42f643b..7538927 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",