summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2020-05-21 16:41:01 -0400
committerAndrew Lee <alee14498@protonmail.com>2020-05-21 16:41:01 -0400
commita06d70c730acbf81c8e9072ed9ce91681afd25e7 (patch)
tree7191d2dc74583e86db2f46b642794d5e089ef03a
parent0f2233a529d80b242732bd40ebaecf3fbb56cecf (diff)
downloadAleeBot-a06d70c730acbf81c8e9072ed9ce91681afd25e7.tar.gz
AleeBot-a06d70c730acbf81c8e9072ed9ce91681afd25e7.tar.bz2
AleeBot-a06d70c730acbf81c8e9072ed9ce91681afd25e7.zip
Added embeds when booting the bot and addeed auto role
-rw-r--r--bot_discord.js23
-rw-r--r--commands/interrogate.js2
-rw-r--r--commands/jail.js2
-rw-r--r--commands/poweroff.js7
-rw-r--r--run_linux.sh1
-rw-r--r--run_win.bat2
6 files changed, 29 insertions, 8 deletions
diff --git a/bot_discord.js b/bot_discord.js
index 4a9b109..340aee7 100644
--- a/bot_discord.js
+++ b/bot_discord.js
@@ -160,6 +160,11 @@ rl.on('line', function(cmd){
break;
case "exit":
console.log('[i] AleeBot will now exit!'.blue)
+ const embed = new Discord.RichEmbed()
+ .setAuthor("AleeBot Status", client.user.avatarURL)
+ .setDescription("AleeBot is now going offline...")
+ .setColor("#ff3333")
+ client.channels.find('id', '606602551634296968').send({embed});
client.destroy();
process.exit(0);
break;
@@ -198,7 +203,7 @@ client.on('ready', () => {
'Fighting AstralMod',
];
setInterval(() => {
- dbl.postStats(client.guilds.size, client.shards.Id, client.shards.total);
+ dbl.postStats(client.guilds.size, client.shards.id, client.shards.total);
}, 1800000);
client.user.setPresence({
status: 'online',
@@ -210,10 +215,22 @@ client.on('ready', () => {
});
}, 200000);
client.user.setStatus('online');
- client.channels.find('id', '606602551634296968').send("**AleeBot Status:** AleeBot has started.");
+ const embed = new Discord.RichEmbed()
+ .setAuthor("AleeBot Status", client.user.avatarURL)
+ .setDescription("AleeBot has started")
+ .setColor("#5cd65c")
+ client.channels.find('id', '606602551634296968').send({embed});
rl.prompt();
});
+client.on('guildMemberAdd', member => {
+ if (member.guild.id != '243022206437687296') return 0
+ var role = member.guild.roles.find((role) => role.name === "Member");
+ member.addRole(role);
+ log(`[i] ${member.user.username} joined Alee Productions.`.green);
+ log(`[i] I gave ${member.user.username} the "Member" role.`.green);
+});
+
client.on('guildCreate', guild => {
log(`[i] New guild joined: ${guild.name} (id: ${guild.id}). This guild has ${guild.memberCount} members!`.blue);
@@ -246,7 +263,7 @@ client.on('message', (msg) => {
if (msg.content.toLowerCase().includes("shut") && msg.content.toLowerCase().includes("up")) {
switch (Math.floor(Math.random() * 1000) % 3) {
case 0:
- msg.reply("Excuse me? Can you not speak to me in that tone...")
+ msg.reply("Hey, Can you not speak to me in that tone...")
break;
case 1:
msg.reply("NO! I can talk as much I can!");
diff --git a/commands/interrogate.js b/commands/interrogate.js
index 5630114..ea7de53 100644
--- a/commands/interrogate.js
+++ b/commands/interrogate.js
@@ -18,7 +18,7 @@
*
* *************************************/
module.exports.run = async (client, message, args) => {
- if (message.guild.id != '243022206437687296') return message.reply ('This is a ACN exclusive command.');
+ if (message.guild.id != '243022206437687296') return message.reply ('This is a ALP exclusive command.');
if (!message.member.hasPermission('BAN_MEMBERS')) return message.reply('It looks like that you don\'t have the permissions to jail members.');
if (!message.guild.member(client.user).hasPermission('MANAGE_ROLES')) return message.reply('Uhh... I don\'t have permission to jail members.');
diff --git a/commands/jail.js b/commands/jail.js
index 18cbfb1..e1ba85f 100644
--- a/commands/jail.js
+++ b/commands/jail.js
@@ -18,7 +18,7 @@
*
* *************************************/
module.exports.run = async (client, message, args) => {
- if (message.guild.id != '243022206437687296') return message.reply ('This is a ACN exclusive command.');
+ if (message.guild.id != '243022206437687296') return message.reply ('This is a ALP exclusive command.');
if (!message.member.hasPermission('BAN_MEMBERS')) return message.reply('It looks like that you don\'t have the permissions to jail members.');
if (!message.guild.member(client.user).hasPermission('MANAGE_ROLES')) return message.reply('Uhh... I don\'t have permission to jail members.');
diff --git a/commands/poweroff.js b/commands/poweroff.js
index f336bed..3af23b8 100644
--- a/commands/poweroff.js
+++ b/commands/poweroff.js
@@ -18,8 +18,13 @@
*
* *************************************/
module.exports.run = async (client, message, args) => {
+ const Discord = require('discord.js');
if (!['242775871059001344',].includes(message.author.id)) return message.reply('Nope! You need the person who created this bot to use this command.');
- await client.channels.find('id', '606602551634296968').send("**AleeBot Status:** AleeBot is now going offline.");
+ const embed = new Discord.RichEmbed()
+ .setAuthor("AleeBot Status", client.user.avatarURL)
+ .setDescription("AleeBot is now going offline...")
+ .setColor("#ff3333")
+ await client.channels.find('id', '606602551634296968').send({embed});
await message.reply(':warning: AleeBot will now exit!');
client.destroy();
process.exit(0);
diff --git a/run_linux.sh b/run_linux.sh
index fedf8fb..4fe9b97 100644
--- a/run_linux.sh
+++ b/run_linux.sh
@@ -1,5 +1,4 @@
#!/bin/bash
-echo 'Welcome to AleeBot!'
for (( ; ; ))
do
git pull
diff --git a/run_win.bat b/run_win.bat
index b2d4974..b01fe26 100644
--- a/run_win.bat
+++ b/run_win.bat
@@ -5,7 +5,7 @@ echo Welcome to the AleeBot Console.
echo If you want to self-host this bot, please continue by executing the following steps:
echo 1. Create a tokens.json file and include the token of your bot user so that the bot does not error out when connecting to Discord Servers.
echo 2. You will need to edit this file that you ran, and remove the 'git pull" line. This causes errors as it will try to pull from the AleeBot git.
-echo 3. Finally, you must credit the developers (AleeCorp Developers will work fine).
+echo 3. Finally, you must credit the developers (Alee Productions Developers will work fine).
echo --------------------------------------------------------------------------------
echo To start the bot when you are ready, type in 'Yes/yes/y' or type in 'debug' to enter debug mode.
set /p start=user@AleeBot:~$