diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/bot_discord.js | 2 | ||||
| -rw-r--r-- | src/commands/ban.js | 23 | ||||
| -rw-r--r-- | src/commands/changelog.js | 9 | ||||
| -rw-r--r-- | src/commands/help.js | 2 | ||||
| -rw-r--r-- | src/commands/kick.js | 18 | ||||
| -rw-r--r-- | src/commands/play.js | 2 |
6 files changed, 48 insertions, 8 deletions
diff --git a/src/bot_discord.js b/src/bot_discord.js index cb828b9..a8d5f8c 100644 --- a/src/bot_discord.js +++ b/src/bot_discord.js @@ -7,7 +7,7 @@ **********************************************/
const Discord = require('discord.js');
const client = new Discord.Client();
-const abVersion = '2.2.0 Beta';
+const abVersion = '2.2.0';
const prefix = 'abb:';
const fs = require('fs');
const config = require('./absettings.json');
diff --git a/src/commands/ban.js b/src/commands/ban.js new file mode 100644 index 0000000..a8d5c6a --- /dev/null +++ b/src/commands/ban.js @@ -0,0 +1,23 @@ +module.exports.run = async (client, message, args) => { + let mreason = args.join(" ").slice(22); + + if (!message.member.permissions.has('BAN_MEMBERS')) return message.reply("It looks like that you don't have the permissions to ban people.") + const member = message.mentions.members.first(); + if (!member) return message.reply("Uhh... Please mention a member first."); + member.ban({ + days: args[1] || null, + reason: `Banned by ${message.author.tag}` + }); + message.reply("User Banned!"); +}; + +exports.conf = { + aliases: [], + guildOnly: false, +}; +exports.help = { + name: 'ban', + description: 'Bans a member', + usage: 'ban [user] [time]', + category: '- Moderation Commands', +}; diff --git a/src/commands/changelog.js b/src/commands/changelog.js index 0095517..be41192 100644 --- a/src/commands/changelog.js +++ b/src/commands/changelog.js @@ -1,11 +1,10 @@ module.exports.run = async (client, message) => {
const Discord = require('discord.js');
const embed = new Discord.RichEmbed()
- .setAuthor('AleeBot ' + '2.2.0 Beta ' + 'Changelog', 'https://cdn.discordapp.com/avatars/282547024547545109/6c147a444ae328c38145ef1f74169e38.png?size=2048')
- .setDescription('What\'s new in AleeBot 2.2 Beta?')
- .addField('[!] Coming soon music commands!', true)
- .addField('[!] Coming soon moderation commands!', true)
- .addField('And even more!', true)
+ .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)
.setFooter('AleeCorp Copyright 2017')
.setColor('#1fd619');
message.channel.sendEmbed(embed);
diff --git a/src/commands/help.js b/src/commands/help.js index 40e4f19..690c91c 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 Beta' + ` Help and on ${client.guilds.size} servers`, 'https://cdn.discordapp.com/avatars/282547024547545109/6c147a444ae328c38145ef1f74169e38.png?size=2048')
+ .setAuthor('AleeBot 2.2.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/kick.js b/src/commands/kick.js new file mode 100644 index 0000000..ffef077 --- /dev/null +++ b/src/commands/kick.js @@ -0,0 +1,18 @@ +module.exports.run = async (client, message) => { + if (!message.member.permissions.has('KICK_MEMBERS')) return message.reply("It looks like that you don't have the permissions to ban people.") + const member = message.mentions.members.first(); + if (!member) return message.reply("Uhh... Please mention a member first."); + member.kick(`Kicked by: ${message.author.tag}`); + message.reply("User Kicked!"); +}; + +exports.conf = { + aliases: [], + guildOnly: false, +}; +exports.help = { + name: 'kick', + description: 'Kicks a member', + usage: 'kick [user]', + category: '- Moderation Commands', +}; diff --git a/src/commands/play.js b/src/commands/play.js index ca4c8cb..d94572e 100644 --- a/src/commands/play.js +++ b/src/commands/play.js @@ -50,7 +50,7 @@ module.exports.run = async (client, message, args) => { .addField('Link', video.url) .addField('Duration', time) .setThumbnail(video.thumbnails.high.url) - .setFooter('Beat Music Player'); + .setFooter('AleeBot Music Player'); await message.channel.send({embed}); if (!client.voiceConnections.get(message.member.guild.id)) message.member.voiceChannel.join().then(function(connection) { |
