aboutsummaryrefslogtreecommitdiff
path: root/aleebot.js
diff options
context:
space:
mode:
authorAndrew Lee <andrew@alee14.me>2025-03-25 02:09:05 -0400
committerAndrew Lee <andrew@alee14.me>2025-03-25 02:09:05 -0400
commit82c2cd30f515fd121bae580555d51cb66fec4c64 (patch)
treec2c23b0690a42155917b5b74c6ee63e0ca4a200b /aleebot.js
downloadAleeBot-APF-82c2cd30f515fd121bae580555d51cb66fec4c64.tar.gz
AleeBot-APF-82c2cd30f515fd121bae580555d51cb66fec4c64.tar.bz2
AleeBot-APF-82c2cd30f515fd121bae580555d51cb66fec4c64.zip
Initial commit
Diffstat (limited to 'aleebot.js')
-rwxr-xr-xaleebot.js133
1 files changed, 133 insertions, 0 deletions
diff --git a/aleebot.js b/aleebot.js
new file mode 100755
index 0000000..c561fae
--- /dev/null
+++ b/aleebot.js
@@ -0,0 +1,133 @@
+/****************************************
+ *
+ * AleeBot and AleeMod for AleeArmy Community
+ * Copyright (C) 2017 Alee14
+ *
+ * This script is made by Alee14 and other people.
+ * Some stuff was made by Victor Tran (vicr123) and swawesome95 (no longer a dev).
+ * Please say thanks to swawesome95 to laying the basics of this bot and thanks for vicr123 for
+ * letting me use some of his source code.
+ *
+ * *************************************/
+const { Client, GatewayIntentBits } = require('discord.js');
+const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent] });
+const config = require('./abtoken.json');
+var prefix = "ab:";
+
+
+const activities = [
+ { name: 'AleeBot 4.0.0', type: 0 },
+ { name: 'Annoy Alee', type: 0 },
+ { name: 'AleeOS or ShiftOS', type: 0 },
+ { name: 'being very cool', type: 0 },
+ { name: 'with a Android device', type: 0 },
+ { name: 'da VMware World!', type: 0 },
+ { name: 'AleeCraft', type: 0 },
+ { name: 'AleeChat', type: 0 },
+ { name: 'For help ab:help', type: 0 },
+ { name: `on ${client.guilds.size} servers`, type: 0 }
+];
+
+function botActivity(client) {
+ const activity = activities[Math.floor(Math.random() * activities.length)];
+
+ client.user.setPresence({
+ activities: [{
+ name: activity.name,
+ type: activity.type
+ }],
+ status: 'online'
+ });
+}
+
+client.once('ready', async () => {
+ console.log("[SUCCESS] AleeBot is now ready!");
+ await botActivity(client);
+});
+
+
+client.on('messageCreate', message => {
+ let args = message.content.split(" ").slice(1);
+
+ if(message.content === prefix + 'profile'){
+ message.reply(`${message.author.avatarURL()}`);
+ }
+
+ if(message.content === prefix + 'git'){
+ message.reply('Here is the github repo: https://github.com/Alee14/AleeBot');
+ }
+
+ if(message.content === prefix + 'ping'){
+ message.reply('Pong! :ping_pong:');
+ }
+
+ if(message.content === prefix + 'pong'){
+ message.reply('Ping! :ping_pong:');
+ }
+
+ if(message.content === prefix + 'help'){
+ var commands = ('```AleeBot 4.0\n');
+ commands +=('Copyright 2017-2025 Andrew Lee\n\n')
+ commands +=('Commands for AleeBot!\n\n')
+ commands += (prefix + 'profile\n')
+ commands += (prefix + 'git\n')
+ commands += (prefix + 'ping\n')
+ commands += (prefix + 'pong\n')
+ commands += (prefix + 'owner\n')
+ commands += (prefix + 'suggest\n')
+ commands += (prefix + 'plan\n')
+ commands += (prefix + 'mod\n')
+ commands += (prefix + 'version\n\n')
+ commands += ('Created by: Alee and swawesome95 (former developer)\n')
+ commands += ('Modified in: April 1st 2025```')
+ message.channel.send(commands);
+ }
+
+ if(message.content === prefix + 'owner'){
+ message.reply('The person who made this is Alee14#9928!');
+ }
+
+ if(message.content === prefix + 'suggest'){
+ message.reply('Sorry this feature is still being worked on :(');
+ }
+
+
+ if(message.content === prefix + 'plan'){
+ message.channel.send ('```Plans for future versions of AleeBot\n\n' +
+ '1. AI\n' +
+ '2. Playing Music\n' +
+ "3. Error Handler\n```");
+ }
+
+ if(message.content === prefix + 'mod'){
+ message.reply("This is working progress if you want to help do **"+prefix+"git** then go to the site and start a pull request")
+ message.channel.send ('```Commands for Staff!\n\n' +
+ 'ab:kick Kicks people\n' +
+ 'ab:ban Bans People\n' +
+ "ab:rm Removes the message with a amount\n" +
+ 'Please note that we are still working on this feature!```');
+ }
+
+
+ if(message.content === prefix + 'version') {
+ message.channel.send("AleeBot's version is 4.0.0.");
+ }
+
+ if (message.content.trim().toLowerCase() === 'aleebot sucks') {
+ switch (Math.floor(Math.random() * 1000) % 3) {
+ case 0:
+ message.reply('Why you hate me .-.');
+ break;
+ case 1:
+ message.reply('Okay but why you hate me?');
+ break;
+ }
+ }
+
+
+ });
+
+ client.login (config.token).catch(function() {
+ console.log("[ERROR] Login failed.");
+ });
+