aboutsummaryrefslogtreecommitdiff
path: root/commands
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2022-09-20 09:24:37 -0400
committerAndrew Lee <alee14498@protonmail.com>2022-09-20 09:24:37 -0400
commit85a8f11507c0fb74b67914090bdfe10c361b775e (patch)
treeda8b96c91854df8953da241ccfe9872e8effe496 /commands
parent96762ce209415c72e098a78771f80fcc41413280 (diff)
downloadAleeBot-85a8f11507c0fb74b67914090bdfe10c361b775e.tar.gz
AleeBot-85a8f11507c0fb74b67914090bdfe10c361b775e.tar.bz2
AleeBot-85a8f11507c0fb74b67914090bdfe10c361b775e.zip
Removed jail command; Added more activities; Few tweaks
Diffstat (limited to 'commands')
-rw-r--r--commands/ask.js1
-rw-r--r--commands/git.js2
-rw-r--r--commands/help.js4
-rw-r--r--commands/info.js2
-rw-r--r--commands/quote.js39
-rw-r--r--commands/serverinfo.js2
-rw-r--r--commands/timeout.js (renamed from commands/jail.js)21
7 files changed, 39 insertions, 32 deletions
diff --git a/commands/ask.js b/commands/ask.js
index 1dd5edd..efb4a22 100644
--- a/commands/ask.js
+++ b/commands/ask.js
@@ -26,6 +26,7 @@ module.exports.run = async (client, message, args) => {
'Yep. Just kidding :P',
'I doubt it.',
'Maybe?',
+ 'Perhaps...',
'I don\'t know?',
'Hmm let me think :thinking:',
];
diff --git a/commands/git.js b/commands/git.js
index 8f6af1f..e4912e1 100644
--- a/commands/git.js
+++ b/commands/git.js
@@ -32,7 +32,7 @@ module.exports.run = async (client, message) => {
new MessageButton()
.setStyle('LINK')
.setLabel('Source Code')
- .setURL('https://github.com/aleeproductions/AleeBot')
+ .setURL('https://github.com/alee14-projects/AleeBot')
);
message.channel.send({embeds: [gitInfo], components: [sourceCode]});
});
diff --git a/commands/help.js b/commands/help.js
index 8fe42cc..e925754 100644
--- a/commands/help.js
+++ b/commands/help.js
@@ -40,8 +40,8 @@ module.exports.run = async (client, message) => {
const prefix = prefixes[message.guild.id].prefixes;
if (!message.guild.members.cache.get(client.user.id).permissions.has('EMBED_LINKS')) return message.reply('ERROR: AleeBot doesn\'t have the permission to send embed links, please enable them to use the full help.');
const embed = new Discord.MessageEmbed()
- .setAuthor('AleeBot ' + require('../storage/settings.json').abVersion + ` Help and on ${client.guilds.cache.size} servers`, client.user.avatarURL())
- .setDescription('Currently on the Alpha-Temp branch. Meaning that experimental features are enabled in this bot...')
+ .setAuthor('AleeBot ' + require('../storage/settings.json').abVersion + ` Help | Serving in ${client.guilds.cache.size} servers`, client.user.avatarURL())
+ .setDescription('[!] Currently on the Alpha-Temp branch. Meaning that experimental features are enabled in this bot...')
.setColor('#1fd619')
categories.forEach(function(x) {
diff --git a/commands/info.js b/commands/info.js
index bae45d4..95eaebb 100644
--- a/commands/info.js
+++ b/commands/info.js
@@ -25,7 +25,7 @@ module.exports.run = async (client, message) => {
.setTitle('Information on AleeBot\'s Host')
.addField('OS Hostname: ', os.hostname(), true)
.addField('NodeJS Version: ', process.versions.node, true)
- .addField('Discord.JS Version: ', version , true)
+ .addField('Discord.JS Version: ', version, true)
.addField('OS Platform: ', os.platform(), true)
.addField('OS Version: ', os.release(), true)
.addField('Mongoose Version:', mongoose.version, true)
diff --git a/commands/quote.js b/commands/quote.js
index e431566..481cc9b 100644
--- a/commands/quote.js
+++ b/commands/quote.js
@@ -19,7 +19,7 @@
* *************************************/
const mongo = require('../plugins/mongo');
const quoteSchema = require('../schema/quote-schema');
-module.exports.run = async (client, message) => {
+module.exports.run = async (client, message, args) => {
if (!['242775871059001344'].includes(message.author.id)) return message.reply('**This command is disabled due to a new system being implemented.**');
const { MessageEmbed } = require('discord.js');
@@ -32,27 +32,26 @@ module.exports.run = async (client, message) => {
let quoQuote;
let quoYear;
- // Written using GitHub CoPilot
+ if (args) {
+ await mongo().then(async (mongoose) => {
+ try {
+ const quote = await quoteSchema.findOne({quoteID: args[1], author: quoAuthor, authorImage: quoAuthorImage, quote: quoQuote, year: quoYear})
+ /*
+ const embed = new MessageEmbed()
+ .setAuthor(quoAuthor, quoAuthorImage)
+ .setDescription(quoQuote)
+ .setColor('#1fd619')
+ .setFooter('- ' + quoYear);
- // Fetch a random quote from quoteSchema database then return the quote using embeds
- const fetchQuote = async () => {
- const quote = await mongo.db.collection('quotes').aggregate([{ $sample: { size: 1 } }]).toArray();
- quoId = quote[0]._id;
- quoAuthor = quote[0].author;
- quoAuthorImage = quote[0].authorImage;
- quoQuote = quote[0].quote;
- quoYear = quote[0].year;
- const embed = new MessageEmbed()
-
- .setColor('#0099ff')
- .setAuthor(quoAuthor, quoAuthorImage)
- .setDescription(`${quoQuote}`)
- .setFooter(`${quoYear}`)
- return message.channel.send(embed);
+ await message.channel.send({embeds:[embed]});*/
+ console.log(quote);
+ } finally {
+ await mongoose.connection.close();
+ }
+ })
+ } else {
- };
-
- fetchQuote();
+ }
/*
diff --git a/commands/serverinfo.js b/commands/serverinfo.js
index 513b1b4..0a2e077 100644
--- a/commands/serverinfo.js
+++ b/commands/serverinfo.js
@@ -24,7 +24,7 @@ module.exports.run = async (client, message) => {
const embed = new Discord.MessageEmbed()
.setAuthor(`${message.guild.name}`, `${message.guild.iconURL()}`)
.setDescription('Server Information')
- .setThumbnail(`${message.guild.iconURL()}`)
+ .setThumbnail(message.guild.iconURL())
.addField('Server Name:', `${message.guild.name}`)
.addField('Server ID:', `${message.guild.id}`)
.addField('Created At:', `${message.guild.createdAt.toUTCString()}`)
diff --git a/commands/jail.js b/commands/timeout.js
index 7f6f3a3..bed9077 100644
--- a/commands/jail.js
+++ b/commands/timeout.js
@@ -18,16 +18,23 @@
*
* *************************************/
module.exports.run = async (client, message, args) => {
- if (message.guild.id != '243022206437687296') return message.reply('This is a Binaryworks exclusive command.');
+ const { MessageEmbed } = require('discord.js');
if (!message.member.permissions.has('BAN_MEMBERS')) return message.reply('It looks like that you don\'t have the permissions to jail members.');
if (!message.guild.members.cache.get(client.user.id).permissions.has('MANAGE_ROLES')) return message.reply('Uhh... I don\'t have permission to jail members.');
+ if (!args[1]) message.reply('Determine the length of the timeout...');
+ if (!args[2]) message.reply('Determine the reason of the timeout...');
+
const member = message.mentions.members.first();
if (!member) return await message.reply('Uhh... Please mention a member first.');
- member.roles.add(message.guild.roles.cache.get('428205205155217418'));
- message.reply(`Alright, I just jailed ${member.user.tag}.`);
+ const timeoutEmbed = new MessageEmbed()
+ .setDescription(`${member.user.tag} just got timed out!`)
+ .addField('Length', `${args[1]} minute(s)`)
+ .addField('Reason', args[2])
+ .setColor('#ec2727')
+ member.timeout(args[1] * 60 * 1000, args[2]).then(message.reply({embeds: [timeoutEmbed]}));
};
exports.conf = {
@@ -35,8 +42,8 @@ exports.conf = {
guildOnly: false,
};
exports.help = {
- name: 'jail',
- description: 'Jails a member',
- usage: 'jail [user]',
- category: '- Binaryworks Exclusive Commands',
+ name: 'timeout',
+ description: 'Times out a member',
+ usage: 'timeout [user]',
+ category: '- Moderation Commands',
};