From 82c2cd30f515fd121bae580555d51cb66fec4c64 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Tue, 25 Mar 2025 02:09:05 -0400 Subject: Initial commit --- .gitignore | 2 + BOT TIMER.txt | 10 +++++ LICENSE | 21 +++++++++ README.md | 29 ++++++++++++ aleebot.js | 133 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ bun.lockb | Bin 0 -> 10318 bytes gource.sh | 1 + package.json | 5 +++ test.json | 4 ++ update.bat | 7 +++ weekly-chat.mp3 | Bin 0 -> 1816114 bytes 11 files changed, 212 insertions(+) create mode 100644 .gitignore create mode 100755 BOT TIMER.txt create mode 100755 LICENSE create mode 100755 README.md create mode 100755 aleebot.js create mode 100755 bun.lockb create mode 100755 gource.sh create mode 100644 package.json create mode 100755 test.json create mode 100755 update.bat create mode 100755 weekly-chat.mp3 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..71f8e34 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules +abtoken.json \ No newline at end of file diff --git a/BOT TIMER.txt b/BOT TIMER.txt new file mode 100755 index 0000000..4369b80 --- /dev/null +++ b/BOT TIMER.txt @@ -0,0 +1,10 @@ +Here is a timer you could add to aleebot + +newCommand("Timer", 0, "timer", "Times a thing", function(args, msgo) { +var interval; +function toRun() { +msgo.reply("You wanted me to remind you to do: " + args[2]); +clearInterval(interval) +} +setInterval(toRun, args[1]*60*1000); +}); \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100755 index 0000000..699f8de --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 AleeCorp + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100755 index 0000000..2c30f32 --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# AleeBot +A Discord Bot where it can do anything (I have no idea what's going to be so don't judge me :P)!!!! + +If you want to become a dev email me at andrew@alee14.ga. +Get gource at: https://gource.io + +# LICENSE + +**MIT License** + +Copyright (c) 2017 AleeCorp + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. 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."); + }); + diff --git a/bun.lockb b/bun.lockb new file mode 100755 index 0000000..958525b Binary files /dev/null and b/bun.lockb differ diff --git a/gource.sh b/gource.sh new file mode 100755 index 0000000..6a21f69 --- /dev/null +++ b/gource.sh @@ -0,0 +1 @@ +gource -f \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..1b1c185 --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "discord.js": "^14.18.0" + } +} \ No newline at end of file diff --git a/test.json b/test.json new file mode 100755 index 0000000..4829a25 --- /dev/null +++ b/test.json @@ -0,0 +1,4 @@ +{ + "token": "token", + "prefix": "ab" +} diff --git a/update.bat b/update.bat new file mode 100755 index 0000000..ff674a9 --- /dev/null +++ b/update.bat @@ -0,0 +1,7 @@ +@echo off +title Update +echo [INFO] Updating Git... +git pull +echo [SUCCESS] Git has been updated! +echo Press Anything to Exit! +pause \ No newline at end of file diff --git a/weekly-chat.mp3 b/weekly-chat.mp3 new file mode 100755 index 0000000..9ce4699 Binary files /dev/null and b/weekly-chat.mp3 differ -- cgit v1.2.3