diff options
Diffstat (limited to 'src/commands')
| -rw-r--r-- | src/commands/ask.js | 30 | ||||
| -rw-r--r-- | src/commands/avatarurl.js | 14 | ||||
| -rw-r--r-- | src/commands/ban.js | 23 | ||||
| -rw-r--r-- | src/commands/changelog.js | 23 | ||||
| -rw-r--r-- | src/commands/eval.js | 67 | ||||
| -rw-r--r-- | src/commands/git.js | 14 | ||||
| -rw-r--r-- | src/commands/help.js | 41 | ||||
| -rw-r--r-- | src/commands/invitebot.js | 16 | ||||
| -rw-r--r-- | src/commands/kick.js | 18 | ||||
| -rw-r--r-- | src/commands/ping.js | 14 | ||||
| -rw-r--r-- | src/commands/play.js | 71 | ||||
| -rw-r--r-- | src/commands/poweroff.js | 17 | ||||
| -rw-r--r-- | src/commands/purge.js | 21 | ||||
| -rw-r--r-- | src/commands/say.js | 18 | ||||
| -rw-r--r-- | src/commands/uptime.js | 26 |
15 files changed, 0 insertions, 413 deletions
diff --git a/src/commands/ask.js b/src/commands/ask.js deleted file mode 100644 index d3d0f4a..0000000 --- a/src/commands/ask.js +++ /dev/null @@ -1,30 +0,0 @@ -module.exports.run = async (client, message, args) => { - let abaskanswer = [ - "Yes.", - "Nope. Just kidding :P", - "Definitely!", - "No.", - "Yep. Just kidding :P", - "I doubt it.", - "Maybe?", - "I don't know?", - "Hmm let me think :thinking:" - ]; - if (args[1]) { - message.channel.sendMessage(abaskanswer[Math.floor(Math.random() * abaskanswer.length)]); - } else { - message.channel.sendMessage("Sorry, I don't know what your saying.") - } - }; - - exports.conf = { - aliases: ['8ball'], - guildOnly: false, - }; - exports.help = { - name: 'ask', - description: 'Give AleeBot a question!', - usage: 'ask [args]', - category: '- Fun Commands', - }; -
\ No newline at end of file diff --git a/src/commands/avatarurl.js b/src/commands/avatarurl.js deleted file mode 100644 index 87e9321..0000000 --- a/src/commands/avatarurl.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports.run = async (client, message) => { - message.reply(message.author.avatarURL); -}; - -exports.conf = { - aliases: [], - guildOnly: false, -}; -exports.help = { - name: 'avatarurl', - description: 'Sends you your avatar picture.', - usage: 'avatarurl', - category: '- Fun Commands', -}; diff --git a/src/commands/ban.js b/src/commands/ban.js deleted file mode 100644 index a8d5c6a..0000000 --- a/src/commands/ban.js +++ /dev/null @@ -1,23 +0,0 @@ -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 deleted file mode 100644 index 2c69bb0..0000000 --- a/src/commands/changelog.js +++ /dev/null @@ -1,23 +0,0 @@ -module.exports.run = async (client, message) => {
- const Discord = require('discord.js');
- const embed = new Discord.RichEmbed()
- .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);
-
-};
-
-exports.conf = {
- aliases: [],
- guildOnly: false,
-};
-exports.help = {
- name: 'changelog',
- description: 'What\'s new',
- usage: 'changelog',
- category: '- General Commands',
-};
diff --git a/src/commands/eval.js b/src/commands/eval.js deleted file mode 100644 index a1aae92..0000000 --- a/src/commands/eval.js +++ /dev/null @@ -1,67 +0,0 @@ -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.'); - const { RichEmbed } = require('discord.js'); - const code = args.join(' '); - - let evaled; - let remove; - - try { - remove = text => { - if (typeof(text) === 'string') { - return text.replace(/`/g, '`' + String.fromCharCode(8203)).replace(/@/g, '@' + String.fromCharCode(8203)); - } else { - return text; - } - }; - - evaled = eval(code); - - if (typeof evaled !== 'string') { - evaled = require('util').inspect(evaled); - } - - } catch (err) { - const embed = new RichEmbed() - .setAuthor('Eval Error') - .setDescription('Eval\'s result') - .addField(':inbox_tray: Input:', `\`\`\`js\n${code}\n\`\`\``) - .addField(':outbox_tray: Output:', `\`\`\`${err}\`\`\``) - .setFooter('Eval', client.user.avatarURL) - .setColor('RED'); - return message.channel.send({ embed }); - } - - try { - const embed = new RichEmbed() - .setAuthor('Eval Success') - .setDescription('Eval\'s result') - .addField(':inbox_tray: Input:', `\`\`\`js\n${code}\n\`\`\``) - .addField(':outbox_tray: Output:', `\`\`\`js\n${remove(evaled)}\n\`\`\``) - .setFooter('Eval', client.user.avatarURL) - .setColor('GREEN'); - - return message.channel.send({ embed }); - } catch (err) { - const embed = new RichEmbed() - .setAuthor('Eval Error') - .setDescription('Eval\'s result') - .addField(':inbox_tray: Input:', `\`\`\`js\n${code}\n\`\`\``) - .addField(':outbox_tray: Output:', `\`\`\`${err}\`\`\``) - .setFooter('Eval', client.user.avatarURL) - .setColor('RED'); - return message.channel.send({ embed }); - } - }; - - exports.conf = { - aliases: [], - guildOnly: false, - }; - exports.help = { - name: 'eval', - description: 'Evalulates commands.', - usage: '<code>', - category: '- Owners Only', - }; -
\ No newline at end of file diff --git a/src/commands/git.js b/src/commands/git.js deleted file mode 100644 index a01d0a3..0000000 --- a/src/commands/git.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports.run = async (client, message) => {
- message.author.send('I can see you want to contribute to this project.\nHere\'s the link: https://github.com/AleeCorp/AleeBot');
-};
-
-exports.conf = {
- aliases: [],
- guildOnly: false,
-};
-exports.help = {
- name: 'git',
- description: 'Get the git info.',
- usage: 'git',
- category: '- General Commands',
-};
diff --git a/src/commands/help.js b/src/commands/help.js deleted file mode 100644 index 4033289..0000000 --- a/src/commands/help.js +++ /dev/null @@ -1,41 +0,0 @@ -const Discord = require('discord.js');
-module.exports.run = async (client, message) => {
- const categories = [];
- const commands = Array.from(client.commands.keys());
-
- commands.forEach(function(x) {
- if (!categories.includes(client.commands.get(x).help.category)) {
- categories.push(client.commands.get(x).help.category);
- }
- });
-
- const embed = new Discord.RichEmbed()
- .setTitle('AleeBot Help')
- .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');
-
- categories.forEach(function(x) {
- let cat = '';
- commands.forEach(function(command) {
- if (client.commands.get(command).help.category == x) {
- cat = cat + command + '\n';
- }
- });
- embed.addField(x, cat);
- });
-
- await message.channel.send({ embed });
-};
-
-exports.conf = {
- aliases: ['h'],
- guildOnly: false,
-};
-exports.help = {
- name: 'help',
- description: 'Displays all the commands or a page with information for 1 command.',
- usage: 'help (command:command-name)',
- category: '- General Commands',
-};
diff --git a/src/commands/invitebot.js b/src/commands/invitebot.js deleted file mode 100644 index 2017cf3..0000000 --- a/src/commands/invitebot.js +++ /dev/null @@ -1,16 +0,0 @@ -module.exports.run = async (client, message) => { - message.reply("Continue in DMs.") - message.author.send('Want AleeBot in your server? Here\'s the link: https://discordapp.com/oauth2/authorize?client_id=282547024547545109&permissions=68185158&scope=bot'); - }; - - exports.conf = { - aliases: [], - guildOnly: false, - }; - exports.help = { - name: 'invitebot', - description: 'Invite AleeBot to your server.', - usage: 'invitebot', - category: '- General Commands', - }; -
\ No newline at end of file diff --git a/src/commands/kick.js b/src/commands/kick.js deleted file mode 100644 index ffef077..0000000 --- a/src/commands/kick.js +++ /dev/null @@ -1,18 +0,0 @@ -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/ping.js b/src/commands/ping.js deleted file mode 100644 index 5ad8f78..0000000 --- a/src/commands/ping.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports.run = async (client, message) => {
- message.reply('**PONG!** :ping_pong: ' + Math.round(client.ping) + ' ms');
-};
-
-exports.conf = {
- aliases: [],
- guildOnly: false,
-};
-exports.help = {
- name: 'ping',
- description: 'Ping the bot.',
- usage: 'ping',
- category: '- General Commands',
-};
diff --git a/src/commands/play.js b/src/commands/play.js deleted file mode 100644 index d94572e..0000000 --- a/src/commands/play.js +++ /dev/null @@ -1,71 +0,0 @@ -module.exports.run = async (client, message, args) => { - if (!args[0]) return await message.channel.send('A name of the song of a link is needed.'); - if (!message.member.voiceChannelID) return await message.channel.send('You are not in a voice channel'); - const YouTube = require('simple-youtube-api'); - const moment = require('moment'); - const youtube = new YouTube(client.apikey); - const url = args.join(' ').replace(/<(.+)>/g, '$1'); - if (!url) return; - await youtube.getVideo(url) - .then(results => { - YTVideo(results); - }) - .catch(() => { - youtube.searchVideos(args.join(' '), 1) - .then(results => { - youtube.getVideo(results[0].url) - .then(vid => { - YTVideo(vid); - }); - }); - }); - - const music = require('../music.js'); - async function YTVideo(video) { - if (video.durationSeconds === 0) { - return message.channel.send('Live streams are not available'); - } - const d = moment.duration({ - s: video.durationSeconds - }); - - const server = music.MusicVariables(client, message.member.guild.id); - const time = moment().startOf('day').add(d).format('HH:mm:ss'); - server.queue.push({ - url: video.url, - title: video.title, - thumbnail: video.thumbnails.high.url, - duration: video.durationSeconds, - requested: message.author.mention, - playing: false - }); - const { RichEmbed } = require('discord.js'); - - const embed = new RichEmbed() - .setTitle('A song has been queued') - .setAuthor(video.title, video.thumbnails.high.url) - .setColor(0x00afff) - .setTimestamp() - .addField('Title', video.title) - .addField('Link', video.url) - .addField('Duration', time) - .setThumbnail(video.thumbnails.high.url) - .setFooter('AleeBot Music Player'); - await message.channel.send({embed}); - if (!client.voiceConnections.get(message.member.guild.id)) - message.member.voiceChannel.join().then(function(connection) { - music.playYT(client, connection, message); - }); - return null; - }}; - -exports.conf = { - aliases: [], - guildOnly: false, -}; -exports.help = { - name: 'play', - description: 'Plays music', - usage: 'play [args]', - category: '- Music Commands', -}; diff --git a/src/commands/poweroff.js b/src/commands/poweroff.js deleted file mode 100644 index 8016726..0000000 --- a/src/commands/poweroff.js +++ /dev/null @@ -1,17 +0,0 @@ -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.'); - await message.reply(':warning: AleeBot will now exit!'); - process.exit(0); - }; - - exports.conf = { - aliases: ['reboot'], - guildOnly: false, - }; - exports.help = { - name: 'poweroff', - description: 'Turns off AleeBot.', - usage: 'poweroff', - category: '- Owners Only', - }; -
\ No newline at end of file diff --git a/src/commands/purge.js b/src/commands/purge.js deleted file mode 100644 index 36a0803..0000000 --- a/src/commands/purge.js +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index dfa2323..0000000 --- a/src/commands/say.js +++ /dev/null @@ -1,18 +0,0 @@ -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.channel.send(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 diff --git a/src/commands/uptime.js b/src/commands/uptime.js deleted file mode 100644 index c1c3ad7..0000000 --- a/src/commands/uptime.js +++ /dev/null @@ -1,26 +0,0 @@ -module.exports.run = async (client, message) => {
-
- let uptime = parseInt(client.uptime);
- uptime = Math.floor(uptime / 1000);
- let uptimeMinutes = Math.floor(uptime / 60);
- const minutes = uptime % 60;
- let hours = 0;
- while (uptimeMinutes >= 60) {
- hours++;
- uptimeMinutes = uptimeMinutes - 60;
- }
- const uptimeSeconds = minutes % 60;
- message.channel.send(':clock3: AleeBot has been up for ' + hours + ' hours, ' + uptimeMinutes + ' minutes, and ' + uptimeSeconds + ' seconds.');
-
-};
-
-exports.conf = {
- aliases: [],
- guildOnly: false,
-};
-exports.help = {
- name: 'uptime',
- description: 'Displays Uptime.',
- usage: 'uptime',
- category: '- General Commands',
-};
|
