forked from Supositware/Haha-Yes
Merge branch 'master' of https://gitlab.com/loicbersier/discordbot
This commit is contained in:
commit
de84de13e9
5 changed files with 38 additions and 19 deletions
|
@ -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} 👏`);
|
||||
}};
|
|
@ -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);
|
||||
}
|
||||
};
|
34
commands/utility/ping.js
Normal file
34
commands/utility/ping.js
Normal file
|
@ -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.` : ''}
|
||||
`);
|
||||
}
|
||||
}
|
||||
};
|
4
index.js
4
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 });
|
||||
});
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue