diff options
| author | Alee <alee14498@gmail.com> | 2018-02-25 14:54:37 -0500 |
|---|---|---|
| committer | Alee <alee14498@gmail.com> | 2018-02-25 14:54:37 -0500 |
| commit | 3e06bff720bd660ef41ce2e149004836595b4e40 (patch) | |
| tree | 0f66307832ceca562df3d13bbdd6fd46e4625ac5 | |
| parent | 2297ebb012e5522ce3b8360c404f522ed30dd985 (diff) | |
| parent | 94eeeec5b7d4d29ae9d372fc1b86ce5351112548 (diff) | |
| download | AleeBot-3e06bff720bd660ef41ce2e149004836595b4e40.tar.gz AleeBot-3e06bff720bd660ef41ce2e149004836595b4e40.tar.bz2 AleeBot-3e06bff720bd660ef41ce2e149004836595b4e40.zip | |
2.0 release (I hope it will work)
| -rw-r--r-- | .gitattributes | 17 | ||||
| -rw-r--r-- | .gitignore | 60 | ||||
| -rw-r--r-- | BOT TIMER.txt | 10 | ||||
| -rw-r--r-- | CONTRIBUTING.md | 4 | ||||
| -rw-r--r-- | CREDIT.md | 6 | ||||
| -rw-r--r-- | LICENSE | 42 | ||||
| -rw-r--r-- | README.md | 26 | ||||
| -rw-r--r-- | absettings.json.example | 10 | ||||
| -rw-r--r-- | aleeplayer.js | 97 | ||||
| -rw-r--r-- | aptokens.json.example | 6 | ||||
| -rw-r--r-- | commands/ask.js | 39 | ||||
| -rw-r--r-- | commands/avatarurl.js | 25 | ||||
| -rw-r--r-- | commands/botinvite.js | 26 | ||||
| -rw-r--r-- | commands/eval.js | 80 | ||||
| -rw-r--r-- | commands/git.js | 24 | ||||
| -rw-r--r-- | commands/ping.js | 25 | ||||
| -rw-r--r-- | commands/say.js | 30 | ||||
| -rw-r--r-- | commands/serverinvite.js | 26 | ||||
| -rw-r--r-- | commands/ship.js | 25 | ||||
| -rw-r--r-- | commands/uptime.js | 62 | ||||
| -rw-r--r-- | commands/userinfo.js | 34 | ||||
| -rw-r--r-- | gource.sh | 1 | ||||
| -rw-r--r-- | package-lock.json | 773 | ||||
| -rw-r--r-- | package.json | 26 | ||||
| -rw-r--r-- | src/bot_discord.js | 98 | ||||
| -rw-r--r-- | src/commands/changelog.js | 24 | ||||
| -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/ping.js | 14 | ||||
| -rw-r--r-- | src/commands/poweroff.js | 17 | ||||
| -rw-r--r-- | src/commands/uptime.js | 26 | ||||
| -rw-r--r-- | weekly-chat.mp3 | bin | 1816114 -> 0 bytes |
33 files changed, 1072 insertions, 703 deletions
diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index bdb0cab..0000000 --- a/.gitattributes +++ /dev/null @@ -1,17 +0,0 @@ -# Auto detect text files and perform LF normalization -* text=auto - -# Custom for Visual Studio -*.cs diff=csharp - -# Standard to msysgit -*.doc diff=astextplain -*.DOC diff=astextplain -*.docx diff=astextplain -*.DOCX diff=astextplain -*.dot diff=astextplain -*.DOT diff=astextplain -*.pdf diff=astextplain -*.PDF diff=astextplain -*.rtf diff=astextplain -*.RTF diff=astextplain @@ -1,54 +1,6 @@ -# Windows image file caches -Thumbs.db -ehthumbs.db - -# Folder config file -Desktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# ========================= -# Operating System Files -# ========================= - -# OSX -# ========================= - -.DS_Store -.AppleDouble -.LSOverride - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -node_modules - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -absettings\.json - -amtoken\.json - -aptokens\.json +
+node_modules/
+
+src/absettings\.json
+
+run.bat
\ No newline at end of file diff --git a/BOT TIMER.txt b/BOT TIMER.txt deleted file mode 100644 index 4369b80..0000000 --- a/BOT TIMER.txt +++ /dev/null @@ -1,10 +0,0 @@ -Here is a timer you could add to aleebot
-
-newCommand("Timer", 0, "timer", "Times a thing", function(args, msgo) {
-var interval;
-function toRun() {
-msgo.reply("You wanted me to remind you to do: " + args[2]);
-clearInterval(interval)
-}
-setInterval(toRun, args[1]*60*1000);
-});
\ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3071e07..6db4b59 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,2 +1,2 @@ -# Contributing to AleeBot -If you want to help me make AleeBot you must get NodeJS to make AleeBot work. +# Contributing to AleeBot
+If you want to help me make AleeBot you must get NodeJS to make AleeBot work.
diff --git a/CREDIT.md b/CREDIT.md deleted file mode 100644 index f8252f5..0000000 --- a/CREDIT.md +++ /dev/null @@ -1,6 +0,0 @@ -# People who helped me making AleeBot - -1. swawesome95 -2. OfficialRain - -I used some source code from AstralMod and Precipitation @@ -1,21 +1,21 @@ -MIT License - -Copyright (c) 2017 AleeCorp - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +MIT License
+
+Copyright (c) 2018 AleeCorp
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
@@ -1,9 +1,17 @@ -# AleeBot -A chat bot for discord written in discord.js. - -If you want to become a dev do a pull request, also submit a problem/suggestion to issues. -Get gource at: https://gource.io - -# License - -We are licensed under the MIT license and don't steal our code and claim as yours please. +# AleeBot
+Welcome to the AleeBot github repo!
+If you want to help do a pull request, also submit a problem/suggestion to issues.
+
+So here's the planned features so far for AleeBot for discord servers
+
+# Contributors
+Here's the list of people who helped me with AleeBot for discord servers
+1. Alee14
+2. OfficialRain (Rain)
+3.
+
+**Please note if you contribute to this please put your name here.**
+
+# License
+
+We are licensed under the MIT license and don't steal our code and claim as yours thanks.
diff --git a/absettings.json.example b/absettings.json.example index 7ae1f82..e9d4e0b 100644 --- a/absettings.json.example +++ b/absettings.json.example @@ -1,5 +1,5 @@ -{ - "abtoken": "token", - "ownerID": "242775871059001344", - "prefix": "ab:", -} +{
+ "abtoken": "token",
+ "ownerID": "242775871059001344",
+ "prefix": "ab:",
+}
diff --git a/aleeplayer.js b/aleeplayer.js deleted file mode 100644 index 10ccfac..0000000 --- a/aleeplayer.js +++ /dev/null @@ -1,97 +0,0 @@ -const { Client } = require('discord.js'); -const yt = require('ytdl-core'); -const tokens = require('./tokens.json'); -const client = new Client(); - -let queue = {}; - -const commands = { - 'play': (msg) => { - if (queue[msg.guild.id] === undefined) return msg.channel.sendMessage(`Add some songs to the queue first with ${tokens.prefix}add`); - if (!msg.guild.voiceConnection) return commands.join(msg).then(() => commands.play(msg)); - if (queue[msg.guild.id].playing) return msg.channel.sendMessage('Already Playing'); - let dispatcher; - queue[msg.guild.id].playing = true; - - console.log(queue); - (function play(song) { - console.log(song); - if (song === undefined) return msg.channel.sendMessage('Queue is empty').then(() => { - queue[msg.guild.id].playing = false; - msg.member.voiceChannel.leave(); - }); - msg.channel.sendMessage(`Playing: **${song.title}** as requested by: **${song.requester}**`); - dispatcher = msg.guild.voiceConnection.playStream(yt(song.url, { audioonly: true }), { passes : tokens.passes }); - let collector = msg.channel.createCollector(m => m); - collector.on('message', m => { - if (m.content.startsWith(tokens.prefix + 'pause')) { - msg.channel.sendMessage('paused').then(() => {dispatcher.pause();}); - } else if (m.content.startsWith(tokens.prefix + 'resume')){ - msg.channel.sendMessage('resumed').then(() => {dispatcher.resume();}); - } else if (m.content.startsWith(tokens.prefix + 'skip')){ - msg.channel.sendMessage('skipped').then(() => {dispatcher.end();}); - } else if (m.content.startsWith('volume+')){ - if (Math.round(dispatcher.volume*50) >= 100) return msg.channel.sendMessage(`Volume: ${Math.round(dispatcher.volume*50)}%`); - dispatcher.setVolume(Math.min((dispatcher.volume*50 + (2*(m.content.split('+').length-1)))/50,2)); - msg.channel.sendMessage(`Volume: ${Math.round(dispatcher.volume*50)}%`); - } else if (m.content.startsWith('volume-')){ - if (Math.round(dispatcher.volume*50) <= 0) return msg.channel.sendMessage(`Volume: ${Math.round(dispatcher.volume*50)}%`); - dispatcher.setVolume(Math.max((dispatcher.volume*50 - (2*(m.content.split('-').length-1)))/50,0)); - msg.channel.sendMessage(`Volume: ${Math.round(dispatcher.volume*50)}%`); - } else if (m.content.startsWith(tokens.prefix + 'time')){ - msg.channel.sendMessage(`time: ${Math.floor(dispatcher.time / 60000)}:${Math.floor((dispatcher.time % 60000)/1000) <10 ? '0'+Math.floor((dispatcher.time % 60000)/1000) : Math.floor((dispatcher.time % 60000)/1000)}`); - } - }); - dispatcher.on('end', () => { - collector.stop(); - play(queue[msg.guild.id].songs.shift()); - }); - dispatcher.on('error', (err) => { - return msg.channel.sendMessage('error: ' + err).then(() => { - collector.stop(); - play(queue[msg.guild.id].songs.shift()); - }); - }); - })(queue[msg.guild.id].songs.shift()); - }, - 'join': (msg) => { - return new Promise((resolve, reject) => { - const voiceChannel = msg.member.voiceChannel; - if (!voiceChannel || voiceChannel.type !== 'voice') return msg.reply('I couldn\'t connect to your voice channel...'); - voiceChannel.join().then(connection => resolve(connection)).catch(err => reject(err)); - }); - }, - 'add': (msg) => { - let url = msg.content.split(' ')[1]; - if (url == '' || url === undefined) return msg.channel.sendMessage(`You must add a YouTube video url, or id after ${tokens.prefix}add`); - yt.getInfo(url, (err, info) => { - if(err) return msg.channel.sendMessage('Invalid YouTube Link: ' + err); - if (!queue.hasOwnProperty(msg.guild.id)) queue[msg.guild.id] = {}, queue[msg.guild.id].playing = false, queue[msg.guild.id].songs = []; - queue[msg.guild.id].songs.push({url: url, title: info.title, requester: msg.author.username}); - msg.channel.sendMessage(`added **${info.title}** to the queue`); - }); - }, - 'queue': (msg) => { - if (queue[msg.guild.id] === undefined) return msg.channel.sendMessage(`Add some songs to the queue first with ${tokens.prefix}add`); - let tosend = []; - queue[msg.guild.id].songs.forEach((song, i) => { tosend.push(`${i+1}. ${song.title} - Requested by: ${song.requester}`);}); - msg.channel.sendMessage(`__**${msg.guild.name}'s Music Queue:**__ Currently **${tosend.length}** songs queued ${(tosend.length > 15 ? '*[Only next 15 shown]*' : '')}\n\`\`\`${tosend.slice(0,15).join('\n')}\`\`\``); - }, - 'help': (msg) => { - let tosend = ['```xl', tokens.prefix + 'join : "Join Voice channel of msg sender"', tokens.prefix + 'add : "Add a valid youtube link to the queue"', tokens.prefix + 'queue : "Shows the current queue, up to 15 songs shown."', tokens.prefix + 'play : "Play the music queue if already joined to a voice channel"', '', 'the following commands only function while the play command is running:'.toUpperCase(), tokens.prefix + 'pause : "pauses the music"', tokens.prefix + 'resume : "resumes the music"', tokens.prefix + 'skip : "skips the playing song"', tokens.prefix + 'time : "Shows the playtime of the song."', 'volume+(+++) : "increases volume by 2%/+"', 'volume-(---) : "decreases volume by 2%/-"', '```']; - msg.channel.sendMessage(tosend.join('\n')); - }, - 'reboot': (msg) => { - if (msg.author.id == tokens.adminID) process.exit(); //Requires a node module like Forever to work. - } -}; - -client.on('ready', () => { - console.log('ready!'); -}); - -client.on('message', msg => { - if (!msg.content.startsWith(tokens.prefix)) return; - if (commands.hasOwnProperty(msg.content.toLowerCase().slice(tokens.prefix.length).split(' ')[0])) commands[msg.content.toLowerCase().slice(tokens.prefix.length).split(' ')[0]](msg); -}); -client.login(tokens.d_token); diff --git a/aptokens.json.example b/aptokens.json.example deleted file mode 100644 index d2b8c17..0000000 --- a/aptokens.json.example +++ /dev/null @@ -1,6 +0,0 @@ -{ - "d_token" : "YOUR DISCORD APP TOKEN", - "adminID" : "YOUR DISCORD USER ID", - "prefix" : "ap:", - "passes" : 1 //can be increased to reduce packetloss at the expense of upload bandwidth, 4-5 should be lossless at the expense of 4-5x upload -} diff --git a/commands/ask.js b/commands/ask.js deleted file mode 100644 index 89ce891..0000000 --- a/commands/ask.js +++ /dev/null @@ -1,39 +0,0 @@ -const Discord = require('discord.js'); -exports.run = (client, message, args, config) => { -var 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 = { - enabled: true, - - guildOnly: false, - - aliases: [], - - permLevel: 0 - -}; - -exports.help = { - - name: 'ask', - - description: 'Go ask AleeBot a question let\'s see what AleeBot\'s response!', - - usage: 'ask [args]' - -}; diff --git a/commands/avatarurl.js b/commands/avatarurl.js deleted file mode 100644 index 65abc45..0000000 --- a/commands/avatarurl.js +++ /dev/null @@ -1,25 +0,0 @@ -const Discord = require('discord.js'); -exports.run = (client, message, args, config) => { -message.reply(message.author.avatarURL); -} - -exports.conf = { - enabled: true, - - guildOnly: false, - - aliases: [], - - permLevel: 0 - -}; - -exports.help = { - - name: 'avatarurl', - - description: 'It displays your avatar url.', - - usage: 'avatarurl' - -}; diff --git a/commands/botinvite.js b/commands/botinvite.js deleted file mode 100644 index e0e43ad..0000000 --- a/commands/botinvite.js +++ /dev/null @@ -1,26 +0,0 @@ -const Discord = require('discord.js'); -exports.run = (client, message, args, config) => { -message.reply(':arrow_left: Continue in DMs.'); -message.author.sendMessage("AleeBot on your server? Great! Here's the link: https://goo.gl/KDQyrp"); -} - -exports.conf = { - enabled: true, - - guildOnly: false, - - aliases: [], - - permLevel: 0 - -}; - -exports.help = { - - name: 'botinvite', - - description: 'Now you can invite your bot to your server!', - - usage: 'botinvite' - -}; diff --git a/commands/eval.js b/commands/eval.js deleted file mode 100644 index a2cdbb4..0000000 --- a/commands/eval.js +++ /dev/null @@ -1,80 +0,0 @@ -const Discord = require('discord.js'); -exports.run = (client, message, args, config) => { -if(message.author.id !== config.ownerID) return; -const clean = text => { - if (typeof(text) === "string") - return text.replace(/`/g, "`" + String.fromCharCode(8203)).replace(/@/g, "@" + String.fromCharCode(8203)); - else - return text; -} -const argseval = message.content.split(" ").slice(1); - try { - var code = argseval.join(" "); - var evaled = eval(code); - - if (typeof evaled !== "string") - evaled = require("util").inspect(evaled); - message.delete(); - - message.channel.send({ - embed: { - color: 3191350, - author: { - name: "Eval is working!", - icon_url: message.author.displayAvatarURL - }, - fields: [{ - name: '**:inbox_tray: Input**', - value: `\`\`\`js\n${code}\n\`\`\`` - }, - { - name: '**:outbox_tray: Output**', - value: `\`\`\`js\n${clean(evaled)}\n\`\`\`` - } - ], - } - }) - } catch (err) { - message.delete(); - - message.channel.send({ - embed: { - color: 3191350, - author: { - name: "Error", - icon_url: message.author.displayAvatarURL - }, - fields: [{ - name: '**Please check your code.**', - value: `\`\`\`xl\n${clean(err)}\n\`\`\`` - }, - { - name: '**Output**', - value: `\`\`\`js\n${clean(evaled)}\n\`\`\`` - } - ], - } - }) - } -} - -exports.conf = { - enabled: true, - - guildOnly: false, - - aliases: [], - - permLevel: 0 - -}; - -exports.help = { - - name: 'eval', - - description: 'It injects code but you cannot use it only the person host it is allow!', - - usage: 'eval [code]' - -}; diff --git a/commands/git.js b/commands/git.js deleted file mode 100644 index 9e5d4be..0000000 --- a/commands/git.js +++ /dev/null @@ -1,24 +0,0 @@ -const Discord = require('discord.js'); -exports.run = (client, message, args, config) => { - message.channel.send ("Here's the github repo: https://github.com/AleeCorp/AleeBot"); -} -exports.conf = { - enabled: true, - - guildOnly: false, - - aliases: [], - - permLevel: 0 - -}; - -exports.help = { - - name: 'git', - - description: 'Tells you the repository of AleeBot.', - - usage: 'git' - -}; diff --git a/commands/ping.js b/commands/ping.js deleted file mode 100644 index d6481bb..0000000 --- a/commands/ping.js +++ /dev/null @@ -1,25 +0,0 @@ -const Discord = require('discord.js'); -exports.run = (client, message, args, config) => { - message.reply("**PONG!** :ping_pong: " + Math.round(client.ping) + " ms"); -} - -exports.conf = { - enabled: true, - - guildOnly: false, - - aliases: [], - - permLevel: 0 - -}; - -exports.help = { - - name: 'ping', - - description: 'It tells you the pingtime.', - - usage: 'ping' - -}; diff --git a/commands/say.js b/commands/say.js deleted file mode 100644 index fa9022f..0000000 --- a/commands/say.js +++ /dev/null @@ -1,30 +0,0 @@ -const Discord = require('discord.js'); -exports.run = (client, message, args, config) => { - if(message.author.id !== config.ownerID) - message.reply(":no_entry: **NOPE!** Sorry buddy Alee is only allow to say this command.") - else { - message.channel.sendMessage(args.join(" ")); - message.delete(); - } -} - -exports.conf = { - enabled: true, - - guildOnly: false, - - aliases: [], - - permLevel: 0 - -}; - -exports.help = { - - name: 'say', - - description: 'You cannot use this command host of the bot can use it!', - - usage: 'say [input]' - -}; diff --git a/commands/serverinvite.js b/commands/serverinvite.js deleted file mode 100644 index 72660b5..0000000 --- a/commands/serverinvite.js +++ /dev/null @@ -1,26 +0,0 @@ -const Discord = require('discord.js'); -exports.run = (client, message, args, config) => { - message.reply(':arrow_left: Continue in DMs.'); - message.author.sendMessage("You want a invite to the AleeArmy server? Here's the link: https://discord.gg/97vUx56"); -} - -exports.conf = { - enabled: true, - - guildOnly: false, - - aliases: [], - - permLevel: 0 - -}; - -exports.help = { - - name: 'serverinvite', - - description: 'The bot will DM you the server invite', - - usage: 'serverinvite' - -}; diff --git a/commands/ship.js b/commands/ship.js deleted file mode 100644 index 2d10ff5..0000000 --- a/commands/ship.js +++ /dev/null @@ -1,25 +0,0 @@ -const Discord = require('discord.js'); -exports.run = (client, message, args, config) => { -message.channel.send(":ship: "+ message.author.username + " x " + message.guild.members.random().displayName); -} - -exports.conf = { - enabled: true, - - guildOnly: false, - - aliases: [], - - permLevel: 0 - -}; - -exports.help = { - - name: 'ship', - - description: 'The Bot will randomize random people that you will ship with.', - - usage: 'ship' - -}; diff --git a/commands/uptime.js b/commands/uptime.js deleted file mode 100644 index dc61369..0000000 --- a/commands/uptime.js +++ /dev/null @@ -1,62 +0,0 @@ -const Discord = require('discord.js'); -exports.run = (client, message, args, config) => { -//This command was ported from AstralMod -var timeString; // What we'll eventually put into the message - -var uptime = parseInt(client.uptime); // Get uptime in ms - -uptime = Math.floor(uptime / 1000); // Convert from ms to s - -var uptimeMinutes = Math.floor(uptime / 60); // Get the uptime in minutes - -var minutes = uptime % 60; - -var hours = 0; - -while (uptimeMinutes >= 60) { - -hours++; - -uptimeMinutes = uptimeMinutes - 60; - -} - - - -if (uptimeMinutes < 10) { - -timeString = hours + ":0" + uptimeMinutes // We need to add an additional 0 to the minutes - -} else { - -timeString = hours + ":" + uptimeMinutes // We don't need to add an extra 0. - -} - - - -message.reply("It looks like AleeBot has been up for " + timeString + " hours."); - -commandProcessed = true; -} - -exports.conf = { - enabled: true, - - guildOnly: false, - - aliases: [], - - permLevel: 0 - -}; - -exports.help = { - - name: 'uptime', - - description: 'It will tell you how long AleeBot has been on for.', - - usage: 'uptime' - -}; diff --git a/commands/userinfo.js b/commands/userinfo.js deleted file mode 100644 index d6b0825..0000000 --- a/commands/userinfo.js +++ /dev/null @@ -1,34 +0,0 @@ -const Discord = require('discord.js'); -exports.run = (client, message, args, config) => { - var embed = new Discord.RichEmbed() - .setAuthor(message.author.username, message.author.avatarURL) - .setThumbnail(message.author.avatarURL) - .setDescription("Here's your info.") - .addField("Names", "Username: " + message.author.username + "\nNickname: " + message.member.displayName) - .addField("Identity", "User ID: " + message.author.id + "\nDiscriminator: " + message.author.discriminator) - .addField("Create and Join Times", "Created account at: " + message.member.user.createdAt + "\nJoined server at: " + message.member.joinedAt) - .setColor("#7af442") - message.channel.sendEmbed(embed); - -} - -exports.conf = { - enabled: true, - - guildOnly: false, - - aliases: [], - - permLevel: 0 - -}; - -exports.help = { - - name: 'userinfo', - - description: 'It will tell your user info!', - - usage: 'userinfo' - -}; diff --git a/gource.sh b/gource.sh deleted file mode 100644 index 47d1eb7..0000000 --- a/gource.sh +++ /dev/null @@ -1 +0,0 @@ -gource -f --key
\ No newline at end of file diff --git a/package-lock.json b/package-lock.json index f8a50d6..aec0027 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,79 +1,694 @@ -{ - "name": "aleebot", - "version": "1.1.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "blessed": { - "version": "0.1.81", - "resolved": "https://registry.npmjs.org/blessed/-/blessed-0.1.81.tgz", - "integrity": "sha1-+WLWh+wsNpVwrnGvhDJW5tDKESk=" - }, - "discord.js": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-11.1.0.tgz", - "integrity": "sha1-U1HVnjeY9TbeGXXpLK5NEa89kmY=", - "requires": { - "long": "3.2.0", - "prism-media": "0.0.1", - "snekfetch": "3.2.4", - "tweetnacl": "0.14.5", - "ws": "2.3.1" - } - }, - "fs": { - "version": "0.0.1-security", - "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", - "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=" - }, - "long": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", - "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=" - }, - "moment": { - "version": "2.18.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.18.1.tgz", - "integrity": "sha1-w2GT3Tzhwu7SrbfIAtu8d6gbHA8=" - }, - "prism-media": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/prism-media/-/prism-media-0.0.1.tgz", - "integrity": "sha1-o0JcnKvVDRxsAuVDlBoRiVZnvRA=" - }, - "profanities": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/profanities/-/profanities-2.5.0.tgz", - "integrity": "sha1-O1OuFKnSoYYPBR+C/kyPRtHVHRU=" - }, - "safe-buffer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz", - "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=" - }, - "snekfetch": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/snekfetch/-/snekfetch-3.2.4.tgz", - "integrity": "sha512-vDZYK3cgt0mFLeAzQXNGgAc/8G3AnbqbfuBt1FOaLgYt42BWEi3z3U5tSLGEs+bvO6d5nU7mBbhpi8RIVF2ztw==" - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" - }, - "ultron": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.0.tgz", - "integrity": "sha1-sHoualQagV/Go0zNRTO67DB8qGQ=" - }, - "ws": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-2.3.1.tgz", - "integrity": "sha1-a5Sz5EfLajY/eF6vlK9jWejoHIA=", - "requires": { - "safe-buffer": "5.0.1", - "ultron": "1.1.0" - } - } - } -} +{
+ "name": "aleebot",
+ "version": "2.0.0",
+ "lockfileVersion": 1,
+ "requires": true,
+ "dependencies": {
+ "ajv": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.3.0.tgz",
+ "integrity": "sha1-RBT/dKUIecII7l/cgm4ywwNUnto=",
+ "requires": {
+ "co": "4.6.0",
+ "fast-deep-equal": "1.0.0",
+ "fast-json-stable-stringify": "2.0.0",
+ "json-schema-traverse": "0.3.1"
+ }
+ },
+ "array.prototype.findindex": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/array.prototype.findindex/-/array.prototype.findindex-2.0.2.tgz",
+ "integrity": "sha1-WAaNJYh+9QXknckssAxE3O5VsGc=",
+ "requires": {
+ "define-properties": "1.1.2",
+ "es-abstract": "1.9.0"
+ }
+ },
+ "asn1": {
+ "version": "0.2.3",
+ "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz",
+ "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y="
+ },
+ "assert-plus": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
+ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
+ },
+ "async-limiter": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz",
+ "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg=="
+ },
+ "asynckit": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
+ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
+ },
+ "aws-sign2": {
+ "version": "0.7.0",
+ "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
+ "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
+ },
+ "aws4": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz",
+ "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4="
+ },
+ "bcrypt-pbkdf": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz",
+ "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=",
+ "optional": true,
+ "requires": {
+ "tweetnacl": "0.14.5"
+ },
+ "dependencies": {
+ "tweetnacl": {
+ "version": "0.14.5",
+ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
+ "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
+ "optional": true
+ }
+ }
+ },
+ "bl": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.1.tgz",
+ "integrity": "sha1-ysMo977kVzDUBLaSID/LWQ4XLV4=",
+ "requires": {
+ "readable-stream": "2.3.3"
+ }
+ },
+ "bluebird": {
+ "version": "3.5.1",
+ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz",
+ "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA=="
+ },
+ "boom": {
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz",
+ "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=",
+ "requires": {
+ "hoek": "4.2.0"
+ }
+ },
+ "caseless": {
+ "version": "0.12.0",
+ "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
+ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
+ },
+ "co": {
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
+ "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ="
+ },
+ "combined-stream": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz",
+ "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=",
+ "requires": {
+ "delayed-stream": "1.0.0"
+ }
+ },
+ "core-util-is": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
+ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
+ },
+ "cryptiles": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz",
+ "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=",
+ "requires": {
+ "boom": "5.2.0"
+ },
+ "dependencies": {
+ "boom": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz",
+ "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==",
+ "requires": {
+ "hoek": "4.2.0"
+ }
+ }
+ }
+ },
+ "dashdash": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
+ "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
+ "requires": {
+ "assert-plus": "1.0.0"
+ }
+ },
+ "debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "requires": {
+ "ms": "2.0.0"
+ }
+ },
+ "define-properties": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz",
+ "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=",
+ "requires": {
+ "foreach": "2.0.5",
+ "object-keys": "1.0.11"
+ }
+ },
+ "delayed-stream": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
+ },
+ "depd": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz",
+ "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k="
+ },
+ "discord.js": {
+ "version": "11.2.1",
+ "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-11.2.1.tgz",
+ "integrity": "sha512-8Mor+IREVWHinjRd6Bu6OwRfT+ET/WEoLWMl8crFvBVcTFmaO/TSwP39C8QIGCB2YMVMYMdljjX/w17AUMemqg==",
+ "requires": {
+ "long": "3.2.0",
+ "prism-media": "0.0.1",
+ "snekfetch": "3.5.3",
+ "tweetnacl": "1.0.0",
+ "ws": "3.2.0"
+ }
+ },
+ "ecc-jsbn": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz",
+ "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=",
+ "optional": true,
+ "requires": {
+ "jsbn": "0.1.1"
+ }
+ },
+ "end-of-stream": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.0.tgz",
+ "integrity": "sha1-epDYM+/abPpurA9JSduw+tOmMgY=",
+ "requires": {
+ "once": "1.4.0"
+ }
+ },
+ "es-abstract": {
+ "version": "1.9.0",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.9.0.tgz",
+ "integrity": "sha512-kk3IJoKo7A3pWJc0OV8yZ/VEX2oSUytfekrJiqoxBlKJMFAJVJVpGdHClCCTdv+Fn2zHfpDHHIelMFhZVfef3Q==",
+ "requires": {
+ "es-to-primitive": "1.1.1",
+ "function-bind": "1.1.1",
+ "has": "1.0.1",
+ "is-callable": "1.1.3",
+ "is-regex": "1.0.4"
+ }
+ },
+ "es-to-primitive": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz",
+ "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=",
+ "requires": {
+ "is-callable": "1.1.3",
+ "is-date-object": "1.0.1",
+ "is-symbol": "1.0.1"
+ }
+ },
+ "eventemitter3": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-2.0.3.tgz",
+ "integrity": "sha1-teEHm1n7XhuidxwKmTvgYKWMmbo="
+ },
+ "extend": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz",
+ "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ="
+ },
+ "extsprintf": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
+ "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
+ },
+ "fast-deep-equal": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz",
+ "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8="
+ },
+ "fast-json-stable-stringify": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
+ "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
+ },
+ "file-type": {
+ "version": "3.9.0",
+ "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz",
+ "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek="
+ },
+ "foreach": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz",
+ "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k="
+ },
+ "forever-agent": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
+ "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
+ },
+ "form-data": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz",
+ "integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=",
+ "requires": {
+ "asynckit": "0.4.0",
+ "combined-stream": "1.0.5",
+ "mime-types": "2.1.17"
+ }
+ },
+ "function-bind": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
+ },
+ "getpass": {
+ "version": "0.1.7",
+ "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
+ "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
+ "requires": {
+ "assert-plus": "1.0.0"
+ }
+ },
+ "har-schema": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
+ "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
+ },
+ "har-validator": {
+ "version": "5.0.3",
+ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz",
+ "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=",
+ "requires": {
+ "ajv": "5.3.0",
+ "har-schema": "2.0.0"
+ }
+ },
+ "has": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz",
+ "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=",
+ "requires": {
+ "function-bind": "1.1.1"
+ }
+ },
+ "hawk": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz",
+ "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==",
+ "requires": {
+ "boom": "4.3.1",
+ "cryptiles": "3.1.2",
+ "hoek": "4.2.0",
+ "sntp": "2.1.0"
+ }
+ },
+ "hoek": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz",
+ "integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ=="
+ },
+ "http-signature": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
+ "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
+ "requires": {
+ "assert-plus": "1.0.0",
+ "jsprim": "1.4.1",
+ "sshpk": "1.13.1"
+ }
+ },
+ "inherits": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
+ },
+ "is-callable": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.3.tgz",
+ "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI="
+ },
+ "is-date-object": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
+ "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY="
+ },
+ "is-regex": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
+ "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=",
+ "requires": {
+ "has": "1.0.1"
+ }
+ },
+ "is-symbol": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz",
+ "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI="
+ },
+ "is-typedarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
+ "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
+ },
+ "isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
+ },
+ "isstream": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
+ "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
+ },
+ "jsbn": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
+ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
+ "optional": true
+ },
+ "json-schema": {
+ "version": "0.2.3",
+ "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
+ "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
+ },
+ "json-schema-traverse": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
+ "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A="
+ },
+ "json-stringify-safe": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
+ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
+ },
+ "jsprim": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
+ "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
+ "requires": {
+ "assert-plus": "1.0.0",
+ "extsprintf": "1.3.0",
+ "json-schema": "0.2.3",
+ "verror": "1.10.0"
+ }
+ },
+ "lodash": {
+ "version": "4.17.4",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
+ "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4="
+ },
+ "long": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz",
+ "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s="
+ },
+ "mime": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz",
+ "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ=="
+ },
+ "mime-db": {
+ "version": "1.30.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz",
+ "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE="
+ },
+ "mime-types": {
+ "version": "2.1.17",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz",
+ "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=",
+ "requires": {
+ "mime-db": "1.30.0"
+ }
+ },
+ "ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
+ },
+ "node-telegram-bot-api": {
+ "version": "0.29.0",
+ "resolved": "https://registry.npmjs.org/node-telegram-bot-api/-/node-telegram-bot-api-0.29.0.tgz",
+ "integrity": "sha512-WZBp5ccr0zMLRNtZ3avrevGpj05mrN59lDmxgpltls0bl3W/wqyNalNGKatTZEJ1cY0pctgd9FqKyCzWr36HcQ==",
+ "requires": {
+ "array.prototype.findindex": "2.0.2",
+ "bl": "1.2.1",
+ "bluebird": "3.5.1",
+ "debug": "2.6.9",
+ "depd": "1.1.1",
+ "eventemitter3": "2.0.3",
+ "file-type": "3.9.0",
+ "mime": "1.4.1",
+ "pump": "1.0.3",
+ "request": "2.83.0",
+ "request-promise": "4.2.2"
+ }
+ },
+ "oauth-sign": {
+ "version": "0.8.2",
+ "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz",
+ "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM="
+ },
+ "object-keys": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz",
+ "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0="
+ },
+ "once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
+ "requires": {
+ "wrappy": "1.0.2"
+ }
+ },
+ "performance-now": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
+ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
+ },
+ "prism-media": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/prism-media/-/prism-media-0.0.1.tgz",
+ "integrity": "sha1-o0JcnKvVDRxsAuVDlBoRiVZnvRA="
+ },
+ "process-nextick-args": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
+ "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M="
+ },
+ "pump": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz",
+ "integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==",
+ "requires": {
+ "end-of-stream": "1.4.0",
+ "once": "1.4.0"
+ }
+ },
+ "punycode": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
+ "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4="
+ },
+ "qs": {
+ "version": "6.5.1",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz",
+ "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A=="
+ },
+ "readable-stream": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz",
+ "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==",
+ "requires": {
+ "core-util-is": "1.0.2",
+ "inherits": "2.0.3",
+ "isarray": "1.0.0",
+ "process-nextick-args": "1.0.7",
+ "safe-buffer": "5.1.1",
+ "string_decoder": "1.0.3",
+ "util-deprecate": "1.0.2"
+ }
+ },
+ "request": {
+ "version": "2.83.0",
+ "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz",
+ "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==",
+ "requires": {
+ "aws-sign2": "0.7.0",
+ "aws4": "1.6.0",
+ "caseless": "0.12.0",
+ "combined-stream": "1.0.5",
+ "extend": "3.0.1",
+ "forever-agent": "0.6.1",
+ "form-data": "2.3.1",
+ "har-validator": "5.0.3",
+ "hawk": "6.0.2",
+ "http-signature": "1.2.0",
+ "is-typedarray": "1.0.0",
+ "isstream": "0.1.2",
+ "json-stringify-safe": "5.0.1",
+ "mime-types": "2.1.17",
+ "oauth-sign": "0.8.2",
+ "performance-now": "2.1.0",
+ "qs": "6.5.1",
+ "safe-buffer": "5.1.1",
+ "stringstream": "0.0.5",
+ "tough-cookie": "2.3.3",
+ "tunnel-agent": "0.6.0",
+ "uuid": "3.1.0"
+ }
+ },
+ "request-promise": {
+ "version": "4.2.2",
+ "resolved": "https://registry.npmjs.org/request-promise/-/request-promise-4.2.2.tgz",
+ "integrity": "sha1-0epG1lSm7k+O5qT+oQGMIpEZBLQ=",
+ "requires": {
+ "bluebird": "3.5.1",
+ "request-promise-core": "1.1.1",
+ "stealthy-require": "1.1.1",
+ "tough-cookie": "2.3.3"
+ }
+ },
+ "request-promise-core": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.1.tgz",
+ "integrity": "sha1-Pu4AssWqgyOc+wTFcA2jb4HNCLY=",
+ "requires": {
+ "lodash": "4.17.4"
+ }
+ },
+ "safe-buffer": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
+ "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg=="
+ },
+ "snekfetch": {
+ "version": "3.5.3",
+ "resolved": "https://registry.npmjs.org/snekfetch/-/snekfetch-3.5.3.tgz",
+ "integrity": "sha512-lAlDofxstlGiDgxW5IGSgvOwA3P49kvvfrMyrEdXgtnx6IX/jMsoShCVFoRHY6zd34BvOLDNjYGfrpgsrfCgDQ=="
+ },
+ "sntp": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz",
+ "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==",
+ "requires": {
+ "hoek": "4.2.0"
+ }
+ },
+ "sshpk": {
+ "version": "1.13.1",
+ "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz",
+ "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=",
+ "requires": {
+ "asn1": "0.2.3",
+ "assert-plus": "1.0.0",
+ "bcrypt-pbkdf": "1.0.1",
+ "dashdash": "1.14.1",
+ "ecc-jsbn": "0.1.1",
+ "getpass": "0.1.7",
+ "jsbn": "0.1.1",
+ "tweetnacl": "0.14.5"
+ },
+ "dependencies": {
+ "tweetnacl": {
+ "version": "0.14.5",
+ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
+ "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
+ "optional": true
+ }
+ }
+ },
+ "stealthy-require": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz",
+ "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks="
+ },
+ "string_decoder": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
+ "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
+ "requires": {
+ "safe-buffer": "5.1.1"
+ }
+ },
+ "stringstream": {
+ "version": "0.0.5",
+ "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
+ "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg="
+ },
+ "tough-cookie": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz",
+ "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=",
+ "requires": {
+ "punycode": "1.4.1"
+ }
+ },
+ "tunnel-agent": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
+ "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
+ "requires": {
+ "safe-buffer": "5.1.1"
+ }
+ },
+ "tweetnacl": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.0.tgz",
+ "integrity": "sha1-cT2LgY2kIGh0C/aDhtBHnmb8ins="
+ },
+ "ultron": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.0.tgz",
+ "integrity": "sha1-sHoualQagV/Go0zNRTO67DB8qGQ="
+ },
+ "util-deprecate": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
+ },
+ "uuid": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz",
+ "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g=="
+ },
+ "verror": {
+ "version": "1.10.0",
+ "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
+ "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
+ "requires": {
+ "assert-plus": "1.0.0",
+ "core-util-is": "1.0.2",
+ "extsprintf": "1.3.0"
+ }
+ },
+ "wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
+ },
+ "ws": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-3.2.0.tgz",
+ "integrity": "sha512-hTS3mkXm/j85jTQOIcwVz3yK3up9xHgPtgEhDBOH3G18LDOZmSAG1omJeXejLKJakx+okv8vS1sopgs7rw0kVw==",
+ "requires": {
+ "async-limiter": "1.0.0",
+ "safe-buffer": "5.1.1",
+ "ultron": "1.1.0"
+ }
+ }
+ }
+}
diff --git a/package.json b/package.json index 08995ad..48bb974 100644 --- a/package.json +++ b/package.json @@ -1,3 +1,4 @@ +<<<<<<< HEAD { "name": "aleebot", "version": "1.1.0", @@ -24,3 +25,28 @@ }, "homepage": "https://github.com/AleeCorp/AleeBot#readme" } +======= +{
+ "name": "aleebot",
+ "version": "2.0.0",
+ "description": "A chat bot for discord written in discord.js.",
+ "main": "src/bot.js",
+ "scripts": {
+ "test": ""
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/AleeCorp/AleeBot.git"
+ },
+ "author": "",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/AleeCorp/AleeBot/issues"
+ },
+ "homepage": "https://github.com/AleeCorp/AleeBot#readme",
+ "dependencies": {
+ "discord.js": "^11.2.1",
+ "node-telegram-bot-api": "^0.29.0"
+ }
+}
+>>>>>>> beta diff --git a/src/bot_discord.js b/src/bot_discord.js new file mode 100644 index 0000000..598fbdd --- /dev/null +++ b/src/bot_discord.js @@ -0,0 +1,98 @@ +/** *******************************************
+ *
+ * AleeBot for Discord servers
+ * Copyright (C) 2018 AleeCorp
+ * License: MIT
+ *
+ **********************************************/
+const Discord = require('discord.js');
+const client = new Discord.Client();
+const abVersion = '2.0.0 Beta';
+const prefix = 'abb:';
+const fs = require('fs');
+const config = require('./absettings.json');
+console.log('Welcome to AleeBot NodeJS Terminal!');
+
+client.commands = new Discord.Collection();
+client.aliases = new Discord.Collection();
+
+fs.readdir('./commands', (err, files) => {
+ if (err) console.error(err);
+ console.log(`Attempting to load a total of ${files.length} commands into the memory.`);
+ files.forEach(file => {
+ try {
+ const command = require(`./commands/${file}`);
+ console.log(`Attempting to load the command "${command.help.name}".`);
+ client.commands.set(command.help.name, command);
+ command.conf.aliases.forEach(alias => {
+ client.aliases.set(alias, command.help.name);
+ console.log(`Attempting to load "${alias}" as an alias for "${command.help.name}"`);
+ });
+ }
+ catch (err) {
+ console.log('An error has occured trying to load a command. Here is the error.');
+ console.log(err.stack);
+ }
+ });
+ console.log('Command Loading complete!');
+ console.log('\n');
+});
+
+
+client.on('ready', () => {
+ console.log('[>] AleeBot is now ready!');
+ console.log('[i] Running version ' + abVersion + ` and in ${client.guilds.size} guilds`);
+ client.user.setPresence({
+ game: {
+ name: 'AleeBot ' + abVersion + ' | ' + config.prefix + 'help',
+ type: 0,
+ },
+ });
+ client.user.setStatus('online');
+});
+
+client.on('guildCreate', guild => {
+
+ console.log(`[i] New guild joined: ${guild.name} (id: ${guild.id}). This guild has ${guild.memberCount} members!`);
+
+});
+
+
+client.on('guildDelete', guild => {
+
+ console.log(`[i] I have been removed from: ${guild.name} (id: ${guild.id})`);
+
+});
+
+
+client.on('message', (msg) => {
+ if (msg.author.bot) return;
+
+ if (!msg.content.startsWith(prefix)) return;
+ const args = msg.content.slice(prefix.length).trim().split(/ +/g);
+ const command = args.shift();
+ let cmd;
+
+ if (client.commands.has(command)) {
+ cmd = client.commands.get(command);
+ } else if (client.aliases.has(command)) {
+ cmd = client.commands.get(client.aliases.get(command));
+ }
+
+ if (cmd) {
+ if (cmd.conf.guildOnly == true) {
+ if (!msg.channel.guild) {
+ return msg.channel.createMessage('This command can only be ran in a guild.');
+ }
+ }
+ try {
+ cmd.run(client, msg, args);
+ }
+ catch (e) {
+ console.error(e);
+ }
+ }
+});
+client.login(config.abtoken).catch(function() {
+ console.log('[X] Login failed. Please contact Alee14#9928 or email him at alee14498@gmail.com.');
+});
diff --git a/src/commands/changelog.js b/src/commands/changelog.js new file mode 100644 index 0000000..88df4bd --- /dev/null +++ b/src/commands/changelog.js @@ -0,0 +1,24 @@ +module.exports.run = async (client, message) => {
+ const Discord = require('discord.js');
+ const embed = new Discord.RichEmbed()
+ .setAuthor('AleeBot ' + '2.0.0 Beta ' + 'Changelog', 'https://cdn.discordapp.com/avatars/282547024547545109/6c147a444ae328c38145ef1f74169e38.png?size=2048')
+ .setDescription('What\'s new in AleeBot 2.0?')
+ .addField('+ Rewritten command handler (Written by jtsshieh big thanks to him!)', true)
+ .addField('+ New uptime command (Thanks to Rain)', true)
+ .addField('? Some commands are the same from 1.x', 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 new file mode 100644 index 0000000..a1aae92 --- /dev/null +++ b/src/commands/eval.js @@ -0,0 +1,67 @@ +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 new file mode 100644 index 0000000..a01d0a3 --- /dev/null +++ b/src/commands/git.js @@ -0,0 +1,14 @@ +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 new file mode 100644 index 0000000..888ca38 --- /dev/null +++ b/src/commands/help.js @@ -0,0 +1,41 @@ +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.0.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 2017');
+
+ 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/ping.js b/src/commands/ping.js new file mode 100644 index 0000000..5ad8f78 --- /dev/null +++ b/src/commands/ping.js @@ -0,0 +1,14 @@ +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/poweroff.js b/src/commands/poweroff.js new file mode 100644 index 0000000..8016726 --- /dev/null +++ b/src/commands/poweroff.js @@ -0,0 +1,17 @@ +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/uptime.js b/src/commands/uptime.js new file mode 100644 index 0000000..c1c3ad7 --- /dev/null +++ b/src/commands/uptime.js @@ -0,0 +1,26 @@ +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',
+};
diff --git a/weekly-chat.mp3 b/weekly-chat.mp3 Binary files differdeleted file mode 100644 index 9ce4699..0000000 --- a/weekly-chat.mp3 +++ /dev/null |
