aboutsummaryrefslogtreecommitdiff
path: root/bot_discord.js
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 /bot_discord.js
parent0f2233a529d80b242732bd40ebaecf3fbb56cecf (diff)
downloadAleeBot-a06d70c730acbf81c8e9072ed9ce91681afd25e7.tar.gz
AleeBot-a06d70c730acbf81c8e9072ed9ce91681afd25e7.tar.bz2
AleeBot-a06d70c730acbf81c8e9072ed9ce91681afd25e7.zip
Added embeds when booting the bot and addeed auto role
Diffstat (limited to 'bot_discord.js')
-rw-r--r--bot_discord.js23
1 files changed, 20 insertions, 3 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!");