diff options
Diffstat (limited to 'src/commands')
| -rw-r--r-- | src/commands/changelog.js | 8 | ||||
| -rw-r--r-- | src/commands/help.js | 2 | ||||
| -rw-r--r-- | src/commands/purge.js | 21 | ||||
| -rw-r--r-- | src/commands/say.js | 18 |
4 files changed, 44 insertions, 5 deletions
diff --git a/src/commands/changelog.js b/src/commands/changelog.js index be41192..2c69bb0 100644 --- a/src/commands/changelog.js +++ b/src/commands/changelog.js @@ -1,10 +1,10 @@ module.exports.run = async (client, message) => {
const Discord = require('discord.js');
const embed = new Discord.RichEmbed()
- .setAuthor('AleeBot ' + '2.2.0 ' + 'Changelog', 'https://cdn.discordapp.com/avatars/282547024547545109/6c147a444ae328c38145ef1f74169e38.png?size=2048')
- .setDescription('What\'s new in AleeBot 2.2?')
- .addField('[>] Music Command!','ab:play [music or url]', true)
- .addField('[>] Moderation Commands!','Kick and Ban has been added!', true)
+ .setAuthor('AleeBot ' + '2.3.0 ' + 'Changelog', 'https://cdn.discordapp.com/avatars/282547024547545109/6c147a444ae328c38145ef1f74169e38.png?size=2048')
+ .setDescription('What\'s new in AleeBot 2.3?')
+ .addField('[>] Purge Command!','Purge command only for moderators!', true)
+ .addField('[>] Say Command!','Say command is only for the person who created the bot!', true)
.setFooter('AleeCorp Copyright 2017')
.setColor('#1fd619');
message.channel.sendEmbed(embed);
diff --git a/src/commands/help.js b/src/commands/help.js index 690c91c..4033289 100644 --- a/src/commands/help.js +++ b/src/commands/help.js @@ -11,7 +11,7 @@ module.exports.run = async (client, message) => { const embed = new Discord.RichEmbed()
.setTitle('AleeBot Help')
- .setAuthor('AleeBot 2.2.0' + ` Help and on ${client.guilds.size} servers`, 'https://cdn.discordapp.com/avatars/282547024547545109/6c147a444ae328c38145ef1f74169e38.png?size=2048')
+ .setAuthor('AleeBot 2.3.0' + ` Help and on ${client.guilds.size} servers`, 'https://cdn.discordapp.com/avatars/282547024547545109/6c147a444ae328c38145ef1f74169e38.png?size=2048')
.setDescription('Every command you input into AleeBot is `' + require('../absettings.json').prefix + '`')
.setColor('#1fd619')
.setFooter('AleeCorp Copyright 2018');
diff --git a/src/commands/purge.js b/src/commands/purge.js new file mode 100644 index 0000000..36a0803 --- /dev/null +++ b/src/commands/purge.js @@ -0,0 +1,21 @@ +module.exports.run = async (client, message, args) => { + if (!message.member.permissions.has('MANAGE_MESSAGES')) return message.reply("It looks like that you don't have the permissions to delete messages.") + if (isNaN(args[0])) return message.reply("Please put the valid number of messages to purge."); + + if (args[0] > 100) return message.channel.send("Please put a number less than 100."); + + message.channel.bulkDelete(args[0]) + .then( messages => message.channel.send(`Successfully deleted ${messages.size} messages.`)) + }; + + exports.conf = { + aliases: ['rm'], + guildOnly: false, + }; + exports.help = { + name: 'purge', + description: 'Removes messages in a bulk.', + usage: 'purge [number]', + category: '- Moderation Commands', + }; +
\ No newline at end of file diff --git a/src/commands/say.js b/src/commands/say.js new file mode 100644 index 0000000..2e6c918 --- /dev/null +++ b/src/commands/say.js @@ -0,0 +1,18 @@ +module.exports.run = async (client, message, args) => { + if (!['242775871059001344',].includes(message.author.id)) return message.reply('Nope! You need the person who created this bot to use this command.'); + let absay = args.join(" "); + message.delete().catch(); + message.reply(absay); + }; + + exports.conf = { + aliases: [], + guildOnly: false, + }; + exports.help = { + name: 'say', + description: 'You can control AleeBot now!', + usage: 'say [context]', + category: '- Owners Only', + }; +
\ No newline at end of file |
