summaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/git.js7
-rw-r--r--src/commands/help.js14
-rw-r--r--src/commands/ping.js7
-rw-r--r--src/commands/uptime.js19
4 files changed, 47 insertions, 0 deletions
diff --git a/src/commands/git.js b/src/commands/git.js
new file mode 100644
index 0000000..a53a377
--- /dev/null
+++ b/src/commands/git.js
@@ -0,0 +1,7 @@
+module.exports.run = async (bot, message, args) => {
+ message.author.send("I can see you want to contribute to this project.\nHere's the link: https://github.com/AleeCorp/AleeBot")
+ }
+
+ module.exports.config = {
+ command: "git"
+ } \ No newline at end of file
diff --git a/src/commands/help.js b/src/commands/help.js
new file mode 100644
index 0000000..a57a7d5
--- /dev/null
+++ b/src/commands/help.js
@@ -0,0 +1,14 @@
+module.exports.run = async (bot, 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)
+ .setFooter("AleeCorp Copyright 2017")
+ .setColor("#1fd619")
+ message.channel.sendEmbed(embed);
+
+}
+
+module.exports.config = {
+ command: "help"
+} \ No newline at end of file
diff --git a/src/commands/ping.js b/src/commands/ping.js
new file mode 100644
index 0000000..12fea51
--- /dev/null
+++ b/src/commands/ping.js
@@ -0,0 +1,7 @@
+module.exports.run = async (bot, message, args) => {
+ message.reply("**PONG!** :ping_pong: " + Math.round(client.ping) + " ms");
+}
+
+module.exports.config = {
+ command: "ping"
+} \ No newline at end of file
diff --git a/src/commands/uptime.js b/src/commands/uptime.js
new file mode 100644
index 0000000..6109bd2
--- /dev/null
+++ b/src/commands/uptime.js
@@ -0,0 +1,19 @@
+module.exports.run = async (bot, message, args) => {
+
+ var uptime = parseInt(client.uptime);
+ uptime = Math.floor(uptime / 1000);
+ var uptimeMinutes = Math.floor(uptime / 60);
+ var minutes = uptime % 60;
+ var hours = 0;
+ while (uptimeMinutes >= 60) {
+ hours++;
+ uptimeMinutes = uptimeMinutes - 60;
+ }
+ var uptimeSeconds = minutes % 60;
+ message.channel.send(":clock3: AleeBot has been up for " + hours + " hours, " + uptimeMinutes + " minutes, and " + uptimeSeconds + " seconds.")
+
+}
+
+module.exports.config = {
+ command: "uptime"
+} \ No newline at end of file