aboutsummaryrefslogtreecommitdiff
path: root/deprecated
diff options
context:
space:
mode:
authorAndrew Lee <andrew@alee14.me>2025-01-11 11:55:18 -0500
committerAndrew Lee <andrew@alee14.me>2025-01-11 11:55:18 -0500
commitf5de90ba89146008af78c16e798e216efccf0c50 (patch)
tree75f2bb7cee8bacce3f92c2b1bc468c7831b3429e /deprecated
parent83dcca0a0279ce6415a3e9d153c13d91284369b0 (diff)
downloadAleeBot-f5de90ba89146008af78c16e798e216efccf0c50.tar.gz
AleeBot-f5de90ba89146008af78c16e798e216efccf0c50.tar.bz2
AleeBot-f5de90ba89146008af78c16e798e216efccf0c50.zip
Ability to add quotes, web interface, pending quotes
Diffstat (limited to 'deprecated')
-rw-r--r--deprecated/balance.js50
-rw-r--r--deprecated/buy.js114
-rw-r--r--deprecated/daily.js56
-rw-r--r--deprecated/pay.js60
4 files changed, 0 insertions, 280 deletions
diff --git a/deprecated/balance.js b/deprecated/balance.js
deleted file mode 100644
index bf7618c..0000000
--- a/deprecated/balance.js
+++ /dev/null
@@ -1,50 +0,0 @@
-/** **************************************
- *
- * Balance: Command for AleeBot
- * Copyright (C) 2017-2021 Alee Productions
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- * *************************************/
-module.exports.run = async (client, message) => {
- const db = require('quick.db');
- const {MessageEmbed} = require('discord.js');
-
- const user = message.mentions.users.first() || message.author;
-
- let balance = await db.fetch(`userBalance_${user.id}`);
-
- if (balance === null) {
- db.set(`userBalance_${message.author.id}`, 0);
- balance = 0;
- }
- const embed = new MessageEmbed()
- .setDescription('**AleeCorp Bank**')
- .addField('Account Holder: ', user.username, true)
- .addField('Account Balance: ', balance, true)
- .setColor('#1fd619');
-
- message.channel.send({embed});
-};
-
-exports.conf = {
- aliases: ['bal', 'money'],
- guildOnly: false,
-};
-exports.help = {
- name: 'balance',
- description: 'Checks the balance of AleeBot',
- usage: 'balance [@someone (optional)]',
- category: '- Economy Commands',
-};
diff --git a/deprecated/buy.js b/deprecated/buy.js
deleted file mode 100644
index 98d4fcf..0000000
--- a/deprecated/buy.js
+++ /dev/null
@@ -1,114 +0,0 @@
-/** **************************************
- *
- * Buy: Command for AleeBot
- * Copyright (C) 2017-2021 Alee Productions
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- * *************************************/
-module.exports.run = async (client, message, args) => {
-const Discord = require('discord.js');
-const fs = require('fs')
-const db = require('quick.db');
-const items = JSON.parse(fs.readFileSync('./storage/items.json', 'utf8'));
-
- let categories = [];
-
- if (!args.join(" ")) {
-
-
- for (var i in items) {
-
-
- if (!categories.includes(items[i].type)) {
- categories.push(items[i].type)
- }
-
- }
-
-
- const embed = new Discord.MessageEmbed()
- .setDescription(`Available Items`)
- .setColor('#1fd619')
-
- for (var i = 0; i < categories.length; i++) {
-
- var tempDesc = '';
-
- for (var c in items) {
- if (categories[i] === items[c].type) {
-
- tempDesc += `${items[c].name} - ${items[c].price}$ - ${items[c].desc}\n`;
-
- }
-
- }
-
- embed.addField(categories[i], tempDesc);
-
- }
-
-
- return message.channel.send({
- embed
- });
-
-
- }
-
- let itemName = '';
- let itemPrice = 0;
- let itemDesc = '';
-
- for (var i in items) {
- if (args.join(" ").trim().toUpperCase() === items[i].name.toUpperCase()) {
- itemName = items[i].name;
- itemPrice = items[i].price;
- itemDesc = items[i].desc;
- }
- }
-
-
- if (itemName === '') {
- return message.channel.send(`Item ${args.join(" ").trim()} not found.`)
- }
-
- let selfBalance = await db.fetch(`userBalance_${message.author.id}`);
-
- if (selfBalance === null) {
- db.set(`userBalance_${message.author.id}`, 0);
- selfBalance = 0
- }
-
- if (itemPrice > selfBalance) return message.reply('You don\'t have enough money for this item.')
-
- db.subtract(`userBalance_${message.author.id}`, itemPrice);
-
- if (itemName === 'Programmer Role') {
- message.guild.members.get(message.author.id).addRole(message.guild.roles.find("name", "Programmers"));
- }
-
- message.channel.send('You bought ' + itemName + '!');
-};
-
-exports.conf = {
- aliases: [],
- guildOnly: false,
-};
-exports.help = {
- name: 'buy',
- description: 'Buy things.',
- usage: 'buy [item]',
- category: '- Economy Commands',
-};
diff --git a/deprecated/daily.js b/deprecated/daily.js
deleted file mode 100644
index 4a38f26..0000000
--- a/deprecated/daily.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/** **************************************
- *
- * Daily: Command for AleeBot
- * Copyright (C) 2017-2021 Alee Productions
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- * *************************************/
-const db = require('quick.db');
-ms = require('parse-ms');
-
-module.exports.run = async (client, message) => {
- const cooldown = 8.64e+7;
- const amount = 100;
-
- const lastDaily = await db.fetch(`lastDaily_${message.author.id}`);
-
- if (lastDaily !== null && cooldown - (Date.now() - lastDaily) > 0) {
- const timeObj = ms(cooldown - (Date.now() - lastDaily));
-
- message.reply(`You already collected your money, please wait **${timeObj.hours}h ${timeObj.minutes}m**!`);
- } else {
- message.channel.send(`You have successfully collected $${amount} dollars!`);
-
- const balance = await db.fetch(`userBalance_${message.author.id}`);
-
- if (balance == null) {
- db.set(`userBalance_${message.author.id}`, 0);
- }
-
- db.set(`lastDaily_${message.author.id}`, Date.now());
- db.add(`userBalance_${message.author.id}`, 100);
- }
-};
-
-exports.conf = {
- aliases: [],
- guildOnly: false,
-};
-exports.help = {
- name: 'daily',
- description: 'This gives you money everyday.',
- usage: 'daily',
- category: '- Economy Commands',
-};
diff --git a/deprecated/pay.js b/deprecated/pay.js
deleted file mode 100644
index 42e0f28..0000000
--- a/deprecated/pay.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/** **************************************
- *
- * Pay: Command for AleeBot
- * Copyright (C) 2017-2021 Alee Productions
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- * *************************************/
-
-module.exports.run = async (client, message, args) => {
- const db = require('quick.db');
- if (!message.mentions.members.first()) return message.reply('Please mention a user...');
-
- const targetMember = message.mentions.members.first();
- const amount = parseInt(args.join(' ').replace(targetMember, ''));
-
- if (isNaN(amount)) return message.reply('Please define an amount.');
-
- let targetBalance = await db.fetch(`userBalance_${targetMember.id}`);
- let selfBalance = await db.fetch(`userBalance_${message.author.id}`);
-
- if (targetBalance === null) {
- db.set(`userBalance_${targetMember.id}`, 0);
- targetBalance = 0;
- }
-
- if (selfBalance === null) {
- db.set(`userBalance_${message.author.id}`, 0);
- selfBalance = 0;
- }
-
- if (amount > selfBalance) return message.reply('Sorry you don\'t have enough money.');
-
- db.add(`userBalance_${targetMember.id}`, amount);
- db.subtract(`userBalance_${message.author.id}`, amount);
-
- message.reply(`Successfully transfered $${amount} to ${targetMember.user}`);
-};
-
-exports.conf = {
- aliases: ['transfer'],
- guildOnly: false,
-};
-exports.help = {
- name: 'pay',
- description: 'You can pay others!',
- usage: 'pay [@user] [interger]',
- category: '- Economy Commands',
-};