aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitattributes17
-rw-r--r--.gitignore54
-rw-r--r--BOT TIMER.txt10
-rw-r--r--README.md7
-rw-r--r--aleebot.js118
-rw-r--r--aleeplayer.js97
-rw-r--r--aptokens.json.example6
-rw-r--r--commands/ask.js39
-rw-r--r--commands/attack.js29
-rw-r--r--commands/avatarurl.js25
-rw-r--r--commands/botinvite.js26
-rw-r--r--commands/eval.js80
-rw-r--r--commands/git.js24
-rw-r--r--commands/help.js56
-rw-r--r--commands/ping.js25
-rw-r--r--commands/say.js30
-rw-r--r--commands/serverinvite.js26
-rw-r--r--commands/ship.js25
-rw-r--r--commands/uptime.js62
-rw-r--r--commands/userinfo.js34
-rw-r--r--package-lock.json64
-rw-r--r--package.json21
-rw-r--r--src/bot.js43
-rw-r--r--weekly-chat.mp3bin1816114 -> 0 bytes
24 files changed, 83 insertions, 835 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
diff --git a/.gitignore b/.gitignore
index 6c89f41..218d642 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,54 +1,4 @@
-# Windows image file caches
-Thumbs.db
-ehthumbs.db
-# Folder config file
-Desktop.ini
+node_modules/
-# 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
+src/absettings\.json
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/README.md b/README.md
index cb6f6d0..135b99e 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,10 @@
# AleeBot
-A chat bot for discord written in discord.js.
+Welcome to the AleeBot github repo!
+So here's the planned features so far
+[x] Electron
+[x] Embed help
-If you want to become a dev do a pull request, also submit a problem/suggestion to issues.
+If you want to help do a pull request, also submit a problem/suggestion to issues.
Get gource at: https://gource.io
# License
diff --git a/aleebot.js b/aleebot.js
deleted file mode 100644
index ad004f7..0000000
--- a/aleebot.js
+++ /dev/null
@@ -1,118 +0,0 @@
-/****************************************
- *
- * AleeBot for AleeArmy Community and other servers
- * 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.
- *
- *
- **************************************/
-const Discord = require('discord.js');
-const moment = require('moment');
-const blessed = require('blessed');
-const fs = require('fs');
-const client = new Discord.Client();
-const config = require('./absettings.json');
-const abversion = "1.1.1";
-const log = message => {
-
- console.log(`[${moment().format('YYYY-MM-DD HH:mm:ss')}] ${message}`);
-
-};
-
-
-
-client.commands = new Discord.Collection();
-
-client.aliases = new Discord.Collection();
-fs.readdir('./commands/', (err, files) => {
- if (err) console.error(err);
- log(`Loading a total of ${files.length} commands.`);
- files.forEach(f => {
- let props = require(`./commands/${f}`);
- log(`Loading Command: ${props.help.name}. Done!`);
- client.commands.set(props.help.name, props);
- props.conf.aliases.forEach(alias => {
- client.aliases.set(alias, props.help.name);
- });
- });
-});
-
-
-client.on('ready', () => {
- log(`[>] AleeBot is now ready! Running version ${abversion} in ${client.guilds.size} guilds`);
- client.user.setPresence({
- game: {
- name: 'with version ' +abversion,
- type: 0
- }
- });
- client.user.setStatus('online')
-});
-
-
-client.on("guildCreate", guild => {
-
- // This event triggers when the bot joins a guild.
-
- log(`New guild joined: ${guild.name} (id: ${guild.id}). This guild has ${guild.memberCount} members!`);
-
-
- guild.defaultChannel.sendMessage(":wave: Hello I am AleeBot thanks for inviting me to your server for help type `" + config.prefix + "help`.")
-
-});
-
-
-
-client.on("guildDelete", guild => {
-
- // this event triggers when the bot is removed from a guild.
-
- log(`I have been removed from: ${guild.name} (id: ${guild.id})`);
-
-
-});
-
-
-client.on("message", function(message) {
- if (message.author.bot) return;
- if (message.channel.type === "dm") return;
- if (message.content.indexOf(config.prefix) !== 0) return;
-
- const args = message.content.slice(config.prefix.length).trim().split(/ +/g);
- const command = args.shift().toLowerCase();
-
- try {
- let commandFile = require(`./commands/${command}.js`);
- commandFile.run(client, message, args, config, abversion);
- } catch (err) {
- message.channel.send(`:no_entry_sign: Error!\n The command ${command} isn't found!`);
- log(err);
- }
-
-
-});
-
-process.on('unhandledRejection', function(err, p) {
- log("[X | UNCAUGHT PROMISE] " + err.stack);
-});
-
-client.login(config.abtoken).catch(function() {
- log("[X] Login failed. Please contact Alee14#9928 or email him at alee14498@gmail.com.");
-});
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/attack.js b/commands/attack.js
deleted file mode 100644
index d0b0ed0..0000000
--- a/commands/attack.js
+++ /dev/null
@@ -1,29 +0,0 @@
-const Discord = require('discord.js');
-exports.run = (client, message, args, config) => {
- //This command was ported from AstralMod
-
-message.channel.send("<@" + message.author.id + "> :right_facing_fist: " + args);
-
-
-commandProcessed = true;
-}
-exports.conf = {
- enabled: true,
-
- guildOnly: false,
-
- aliases: [],
-
- permLevel: 0
-
-};
-
-exports.help = {
-
- name: 'attack',
-
- description: 'If your mad at someone if they messed up use this command and mention them.',
-
- usage: 'attack [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/help.js b/commands/help.js
deleted file mode 100644
index da83fe7..0000000
--- a/commands/help.js
+++ /dev/null
@@ -1,56 +0,0 @@
-const Discord = require('discord.js');
-//const config = require('./absettings.json');
-//const abversion = require(config.abversion)
-exports.run = (client, message, args, config, abversion) => {
-
-var embed = new Discord.RichEmbed()
- .setTitle(`Commands for AleeBot ` + abversion + ` and running on ${client.guilds.size} servers.`)
- .setDescription('Every command you put in this bot must start with `ab:`')
- .setThumbnail("https://cdn.discordapp.com/avatars/282547024547545109/6c147a444ae328c38145ef1f74169e38.png?size=2048")
- .addField('Fun Stuff:', 'attack\nask\nship',true)
- .addField('Info:', 'userinfo\n',true)
- .addField('Link:', 'botinvite\nserverinvite\ngit',true)
- .addField('Owner Only:', 'say\neval',true)
- .addField('Monitor:', 'ping\nuptime',true)
- .addField('Etc:', 'avatarurl', true)
- .setFooter("AleeBot "+ abversion +" Copyright 2017. Created by Alee14", "https://cdn.discordapp.com/avatars/282547024547545109/6c147a444ae328c38145ef1f74169e38.png?size=2048")
- .setColor("#7af442")
- message.channel.sendEmbed(embed);
-} /* This feature is broken
- else if {
- message.channel.send ("```Commands for AleeBot "+ abversion +".\nYou are using this view because this bot doesn't have permission to send embed link.\n\n" +
- ''+prefix+'avatarurl\n' +
- ''+prefix+'git\n' +
- ''+prefix+'ping\n' +
- ''+prefix+'suggest\n' +
- ''+prefix+'uptime\n' +
- ''+prefix+'userinfo\n' +
- ''+prefix+'serverinfo\n' +
- ''+prefix+'botinvite\n' +
- ''+prefix+'serverinvite\n' +
- ''+prefix+'plan\n' +
- ''+prefix+'attack\n' +
- ''+prefix+'ask\n' +
- ''+prefix+'ship\n\n' +
- "Copyright "+ year +". Created by Alee14\n```"); */
- exports.conf = {
- enabled: true,
-
- guildOnly: false,
-
- aliases: ['h', 'halp'],
-
- permLevel: 0
-
- };
-
-
- exports.help = {
-
- name: 'help',
-
- description: 'Displays all the available commands for your permission level.',
-
- usage: 'help [command]'
-
- };
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/package-lock.json b/package-lock.json
index f8a50d6..12c62e5 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,65 +1,50 @@
{
"name": "aleebot",
- "version": "1.1.0",
+ "version": "2.0.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="
+ "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=="
},
"discord.js": {
- "version": "11.1.0",
- "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-11.1.0.tgz",
- "integrity": "sha1-U1HVnjeY9TbeGXXpLK5NEa89kmY=",
+ "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.2.4",
- "tweetnacl": "0.14.5",
- "ws": "2.3.1"
+ "snekfetch": "3.5.3",
+ "tweetnacl": "1.0.0",
+ "ws": "3.2.0"
}
},
- "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="
+ "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.2.4",
- "resolved": "https://registry.npmjs.org/snekfetch/-/snekfetch-3.2.4.tgz",
- "integrity": "sha512-vDZYK3cgt0mFLeAzQXNGgAc/8G3AnbqbfuBt1FOaLgYt42BWEi3z3U5tSLGEs+bvO6d5nU7mBbhpi8RIVF2ztw=="
+ "version": "3.5.3",
+ "resolved": "https://registry.npmjs.org/snekfetch/-/snekfetch-3.5.3.tgz",
+ "integrity": "sha512-lAlDofxstlGiDgxW5IGSgvOwA3P49kvvfrMyrEdXgtnx6IX/jMsoShCVFoRHY6zd34BvOLDNjYGfrpgsrfCgDQ=="
},
"tweetnacl": {
- "version": "0.14.5",
- "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
- "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.0.tgz",
+ "integrity": "sha1-cT2LgY2kIGh0C/aDhtBHnmb8ins="
},
"ultron": {
"version": "1.1.0",
@@ -67,11 +52,12 @@
"integrity": "sha1-sHoualQagV/Go0zNRTO67DB8qGQ="
},
"ws": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/ws/-/ws-2.3.1.tgz",
- "integrity": "sha1-a5Sz5EfLajY/eF6vlK9jWejoHIA=",
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-3.2.0.tgz",
+ "integrity": "sha512-hTS3mkXm/j85jTQOIcwVz3yK3up9xHgPtgEhDBOH3G18LDOZmSAG1omJeXejLKJakx+okv8vS1sopgs7rw0kVw==",
"requires": {
- "safe-buffer": "5.0.1",
+ "async-limiter": "1.0.0",
+ "safe-buffer": "5.1.1",
"ultron": "1.1.0"
}
}
diff --git a/package.json b/package.json
index 7db00da..3264925 100644
--- a/package.json
+++ b/package.json
@@ -1,16 +1,8 @@
{
"name": "aleebot",
- "version": "1.1.0",
- "description": "A chat bot for discord written in discord.js",
- "main": "aleebot.js",
- "dependencies": {
- "blessed": "^0.1.81",
- "discord.js": "^11.1.0",
- "fs": "^0.0.1-security",
- "moment": "^2.18.1",
- "profanities": "^2.5.0"
- },
- "devDependencies": {},
+ "version": "2.0.0",
+ "description": "A chat bot for discord written in discord.js.",
+ "main": "src/bot.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
@@ -18,10 +10,13 @@
"type": "git",
"url": "git+https://github.com/AleeCorp/AleeBot.git"
},
- "author": "alee14",
+ "author": "",
"license": "MIT",
"bugs": {
"url": "https://github.com/AleeCorp/AleeBot/issues"
},
- "homepage": "https://github.com/AleeCorp/AleeBot#readme"
+ "homepage": "https://github.com/AleeCorp/AleeBot#readme",
+ "dependencies": {
+ "discord.js": "^11.2.1"
+ }
}
diff --git a/src/bot.js b/src/bot.js
new file mode 100644
index 0000000..0107e72
--- /dev/null
+++ b/src/bot.js
@@ -0,0 +1,43 @@
+/*********************************************
+*
+* AleeBot for Discord servers
+* Copyright (C) 2017 AleeCorp
+*
+**********************************************/
+const Discord = require('discord.js');
+const client = new Discord.Client();
+const abVersion = "2.0.0";
+const prefix = "abb:"
+const config = require('./absettings.json');
+
+client.on('ready', () => {
+ console.log("[>] AleeBot is now ready!")
+ console.log("Running version " + abVersion + `and in ${client.guilds.size} guilds`)
+ client.user.setPresence({
+ game: {
+ name: 'with version ' + abVersion,
+ type: 0
+ }
+ });
+ client.user.setStatus('online')
+});
+
+
+client.on("message", function(message) {
+ if (message.author.bot) return;
+ if (message.channel.type === "dm") return;
+ if (message.content.indexOf(config.prefix) !== 0) return;
+
+ let command = message.content.split(" ")[0];
+ command = command.slice(prefix.length);
+
+ let args = message.content.split(" ").slice(1);
+
+ if(command === 'test'){
+ message.reply(`[SUCCESS] This command is temporarily so this command will be deleted\nRunning version ` + abVersion);
+ }
+
+});
+client.login(config.abtoken).catch(function() {
+ console.log("[X] Login failed. Please contact Alee14#9928 or email him at alee14498@gmail.com.");
+}); \ No newline at end of file
diff --git a/weekly-chat.mp3 b/weekly-chat.mp3
deleted file mode 100644
index 9ce4699..0000000
--- a/weekly-chat.mp3
+++ /dev/null
Binary files differ