summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlee14 <Alee14498@gmail.com>2018-01-07 08:53:30 -0500
committerAlee14 <Alee14498@gmail.com>2018-01-07 08:53:30 -0500
commit533bf07438478a93c498ef831f99c3c1ab93eb2f (patch)
tree5b2b45bd1ddfdd594bc596f18f5df135e30f28ad /src
parentb23c90a245b7f0440f03eeb23fb61ccbef9e3cc5 (diff)
downloadAleeBot-533bf07438478a93c498ef831f99c3c1ab93eb2f.tar.gz
AleeBot-533bf07438478a93c498ef831f99c3c1ab93eb2f.tar.bz2
AleeBot-533bf07438478a93c498ef831f99c3c1ab93eb2f.zip
Added changelog and some bugs aren't fixed yet :(
Diffstat (limited to 'src')
-rw-r--r--src/bot_discord.js1
-rw-r--r--src/bot_telegram.js20
-rw-r--r--src/commands/changelog.js16
-rw-r--r--src/commands/git.js2
-rw-r--r--src/commands/help.js3
-rw-r--r--src/commands/ping.js2
-rw-r--r--src/commands/uptime.js2
7 files changed, 21 insertions, 25 deletions
diff --git a/src/bot_discord.js b/src/bot_discord.js
index 3e2f67c..174612d 100644
--- a/src/bot_discord.js
+++ b/src/bot_discord.js
@@ -10,7 +10,6 @@ const client = new Discord.Client();
const abVersion = "2.0.0 Beta";
const prefix = "abb:";
const fs = require("fs");
-const blessed = require('blessed');
const config = require('./absettings.json');
console.log(`Welcome to AleeBot NodeJS Terminal!`);
diff --git a/src/bot_telegram.js b/src/bot_telegram.js
deleted file mode 100644
index 3ca14c3..0000000
--- a/src/bot_telegram.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/*********************************************
- *
- * AleeBot for Alee's Lounge telegram chat
- * Copyright (C) 2017 AleeCorp
- * License: MIT
- *
- **********************************************/
- const TelegramBot = require('node-telegram-bot-api');
- const abVersion = ('1.0 Beta');
- var token = "506287133:AAFUxedYBjhvjNSO6HFitJqk-tLjZ1gY864";
- var opt = {polling: true};
- var bot = new TelegramBot(token, opt);
-
- bot.on('message', function (msg) {
- console.log(msg);
- var id = msg.chat.id;
- var echo = msg.text;
-
- bot.sendMessage(id, echo);
- }); \ No newline at end of file
diff --git a/src/commands/changelog.js b/src/commands/changelog.js
new file mode 100644
index 0000000..93efcb6
--- /dev/null
+++ b/src/commands/changelog.js
@@ -0,0 +1,16 @@
+module.exports.run = async (client, message, args) => {
+ var embed = new Discord.RichEmbed()
+ .setAuthor('AleeBot ' + abVersion + `Changelog`, "https://cdn.discordapp.com/avatars/282547024547545109/6c147a444ae328c38145ef1f74169e38.png?size=2048")
+ .setDescription("What's new in AleeBot?")
+ .addField("+ Rewritten command handler", 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);
+
+}
+
+module.exports.config = {
+ command: "changelog"
+} \ No newline at end of file
diff --git a/src/commands/git.js b/src/commands/git.js
index a53a377..934ee78 100644
--- a/src/commands/git.js
+++ b/src/commands/git.js
@@ -1,4 +1,4 @@
-module.exports.run = async (bot, message, args) => {
+module.exports.run = async (client, message, args) => {
message.author.send("I can see you want to contribute to this project.\nHere's the link: https://github.com/AleeCorp/AleeBot")
}
diff --git a/src/commands/help.js b/src/commands/help.js
index e191bc1..54136f7 100644
--- a/src/commands/help.js
+++ b/src/commands/help.js
@@ -1,8 +1,9 @@
+const Discord = require('discord.js');
module.exports.run = async (client, message, args) => {
var embed = new Discord.RichEmbed()
.setAuthor('AleeBot ' + abVersion + ` 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 `" + config.prefix + "`")
- .addField("- General Commands", "ping\nuptime\ngit", true)
+ .addField("- General Commands", "ping\nuptime\ngit\nchangelog", true)
.setFooter("AleeCorp Copyright 2017")
.setColor("#1fd619")
message.channel.sendEmbed(embed);
diff --git a/src/commands/ping.js b/src/commands/ping.js
index 12fea51..95a561e 100644
--- a/src/commands/ping.js
+++ b/src/commands/ping.js
@@ -1,4 +1,4 @@
-module.exports.run = async (bot, message, args) => {
+module.exports.run = async (client, message, args) => {
message.reply("**PONG!** :ping_pong: " + Math.round(client.ping) + " ms");
}
diff --git a/src/commands/uptime.js b/src/commands/uptime.js
index 6109bd2..737a386 100644
--- a/src/commands/uptime.js
+++ b/src/commands/uptime.js
@@ -1,4 +1,4 @@
-module.exports.run = async (bot, message, args) => {
+module.exports.run = async (client, message, args) => {
var uptime = parseInt(client.uptime);
uptime = Math.floor(uptime / 1000);