aboutsummaryrefslogtreecommitdiff
path: root/commands
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2023-10-14 00:16:49 -0400
committerAndrew Lee <alee14498@protonmail.com>2023-10-14 00:16:49 -0400
commit0c0155a4d207611fb3d975f9e7e56d04fff63d44 (patch)
treed36af29ecd127f9865118872f6c56d35dcfa2c7b /commands
parent1a7a627446edfeb270850f0ed15c9c8d604380b2 (diff)
downloadAleeBot-0c0155a4d207611fb3d975f9e7e56d04fff63d44.tar.gz
AleeBot-0c0155a4d207611fb3d975f9e7e56d04fff63d44.tar.bz2
AleeBot-0c0155a4d207611fb3d975f9e7e56d04fff63d44.zip
Docker; Removed packages; Removed binaryworks refs
Diffstat (limited to 'commands')
-rw-r--r--commands/addquote.js61
-rw-r--r--commands/help.js5
-rw-r--r--commands/interrogate.js4
-rw-r--r--commands/quote.js12
-rw-r--r--commands/serverinfo.js6
-rw-r--r--commands/slowdown.js2
-rw-r--r--commands/suggest.js6
-rw-r--r--commands/suggestfeature.js14
-rw-r--r--commands/userinfo.js2
9 files changed, 26 insertions, 86 deletions
diff --git a/commands/addquote.js b/commands/addquote.js
deleted file mode 100644
index 477d891..0000000
--- a/commands/addquote.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/** **************************************
- *
- * AddQuote: 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 quoteDB = require('../models/quote');
-const Discord = require("discord.js");
-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.**');
- try {
- let newAuthor;
- let newAuthorImage;
- let newQuote;
- let newYear;
-
- const quote = await quoteDB.create({
- author: newAuthor,
- authorImage: newAuthorImage,
- quote: newQuote,
- year: newYear
- })
-
- const setupEmbed = new Discord.MessageEmbed()
- .setTitle('AleeBot Quote Setup', client.user.avatarURL())
- .setDescription('Input the data to the following embed')
- .addField('Author', newAuthor, true)
- .addField('Author Image (URL)', newAuthorImage, true)
- .addField('Quote', newQuote, true)
- .addField('Year', newYear, true);
-
- message.reply({embeds: [setupEmbed]});
- } catch (error) {
- console.log(error)
- }
-};
-
-exports.conf = {
- aliases: [],
- guildOnly: true,
-};
-exports.help = {
- name: 'addquote',
- description: 'Sets the guild prefix.',
- usage: 'addquote [author] [authorImage] [quote] [year]',
- category: '- Quote Commands',
-};
-
diff --git a/commands/help.js b/commands/help.js
index e925754..0b9191e 100644
--- a/commands/help.js
+++ b/commands/help.js
@@ -40,8 +40,9 @@ 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 | 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...')
+ .setAuthor('AleeBot ' + require('../storage/settings.json').abVersion + ` Help`, client.user.avatarURL())
+ .setDescription('Every command you input into AleeBot is `ab:`')
+ .setFooter(`Currently serving on ${client.guilds.cache.size} servers`)
.setColor('#1fd619')
categories.forEach(function(x) {
diff --git a/commands/interrogate.js b/commands/interrogate.js
index 16a1887..3386352 100644
--- a/commands/interrogate.js
+++ b/commands/interrogate.js
@@ -18,7 +18,7 @@
*
* *************************************/
module.exports.run = async (client, message, args) => {
- if (message.guild.id != '243022206437687296') return message.reply('This is a Binaryworks exclusive command.');
+ if (message.guild.id !== '243022206437687296') return message.reply('This is a Binaryworks exclusive command.');
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.');
@@ -38,5 +38,5 @@ exports.help = {
name: 'interrogate',
description: 'Interrogates a member',
usage: 'interrogate [user]',
- category: '- Binaryworks Exclusive Commands',
+ category: '- ALP Exclusive Commands',
};
diff --git a/commands/quote.js b/commands/quote.js
index 81f9142..37f5714 100644
--- a/commands/quote.js
+++ b/commands/quote.js
@@ -24,23 +24,23 @@ module.exports.run = async (client, message, args) => {
if (quoteID === undefined) {
const quoteList = await quoteDB.findAll({ attributes: ['id'] })
- quoteID = Math.floor(Math.random() * (quoteList.length - 1)) + 1
+ const random = crypto.getRandomValues(new Uint32Array(1));
+ quoteID = quoteList[random[0] % quoteList.length].id;
}
const quote = await quoteDB.findOne({ where: { id: quoteID } })
if (quote) {
- const embed = new MessageEmbed()
- .setAuthor({ name: quote.author, iconURL: quote.authorImage})
+ const quoteEmbed = new MessageEmbed()
+ .setAuthor({ name: quote.author, iconURL: quote.authorImage })
.setDescription(quote.quote)
.setColor('#1fd619')
.setFooter('- ' + quote.year);
- await message.reply('Alright, here\'s your quote.')
- await message.channel.send({embeds:[embed]});
+ await message.reply({ content: 'Alright, here\'s your quote.', embeds: [quoteEmbed] })
} else {
- message.reply('Cannot find quote');
+ message.reply('Cannot find quote, specify the correct quote id.');
}
diff --git a/commands/serverinfo.js b/commands/serverinfo.js
index 0a2e077..67442a2 100644
--- a/commands/serverinfo.js
+++ b/commands/serverinfo.js
@@ -20,14 +20,14 @@
module.exports.run = async (client, message) => {
const Discord = require('discord.js');
const listedChannels = [];
+ let guildOwner = await message.guild.fetchOwner();
let memberCountNoBots = await message.guild.members.fetch().then((members) => members.filter(member => !member.user.bot).size);
const embed = new Discord.MessageEmbed()
.setAuthor(`${message.guild.name}`, `${message.guild.iconURL()}`)
.setDescription('Server Information')
.setThumbnail(message.guild.iconURL())
- .addField('Server Name:', `${message.guild.name}`)
- .addField('Server ID:', `${message.guild.id}`)
- .addField('Created At:', `${message.guild.createdAt.toUTCString()}`)
+ .addField('Main Information', `**Server Name:** ${message.guild.name}\n**Server ID:** ${message.guild.id}\n**Server Owner:** ${guildOwner.user.tag}`)
+ .addField('Join Dates', `**Created At:** ${message.guild.createdAt.toUTCString()}\n**AleeBot Joined:** ${message.guild.joinedAt.toUTCString()}`)
/*message.guild.channels.cacheType.forEach(channel => {
listedChannels.push(channel)
})*/
diff --git a/commands/slowdown.js b/commands/slowdown.js
index 44d8230..55e441b 100644
--- a/commands/slowdown.js
+++ b/commands/slowdown.js
@@ -21,7 +21,7 @@ module.exports.run = async (client, message, args) => {
if (!message.member.permissions.has('MANAGE_CHANNELS')) return message.reply('It looks like that you don\'t have the permissions to slowdown channels.');
if (isNaN(args[0])) return message.reply('Please input a valid number to slowdown a channel.');
await message.channel.setRateLimitPerUser(args[0]);
- message.channel.send(`This channel has been slowdowned for ${args[0]} second(s).`);
+ message.channel.send(`This channel has been slowdown for ${args[0]} second(s).`);
};
diff --git a/commands/suggest.js b/commands/suggest.js
index 0ca21b8..b503139 100644
--- a/commands/suggest.js
+++ b/commands/suggest.js
@@ -18,7 +18,7 @@
*
* *************************************/
module.exports.run = async (client, message, args) => {
- if (message.guild.id != '243022206437687296') return message.reply('This is a Binaryworks exclusive command.');
+ if (message.guild.id !== '243022206437687296') return message.reply('This is a Andrew Lee Projects exclusive command.');
const {MessageEmbed} = require('discord.js');
client.channels.cache.get('427495678390960148').send({ embeds: [
new MessageEmbed()
@@ -39,7 +39,7 @@ exports.conf = {
};
exports.help = {
name: 'suggest',
- description: 'Suggest a feature in Binaryworks.',
+ description: 'Suggest a feature in Andrew Lee Projects.',
usage: 'suggest [suggestion]',
- category: '- Binaryworks Exclusive Commands',
+ category: '- ALP Exclusive Commands',
};
diff --git a/commands/suggestfeature.js b/commands/suggestfeature.js
index c7623d2..21b6849 100644
--- a/commands/suggestfeature.js
+++ b/commands/suggestfeature.js
@@ -1,5 +1,5 @@
/****************************************
- *
+ *
* SuggestFeature: Command for AleeBot
* Copyright (C) 2017-2021 Alee Productions
*
@@ -15,11 +15,11 @@
*
* 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 { MessageEmbed } = require('discord.js');
-
+
client.channels.cache.get('427495678390960148').send({ embeds: [
new MessageEmbed()
.setColor('#1fd619')
@@ -28,10 +28,10 @@ module.exports.run = async (client, message, args) => {
.addField('Suggestion Contents', args.join(' '))
.setFooter(`Sending from ${message.guild.name}`, message.guild.iconURL())]}
);
- await message.reply('Your suggestion has been shown to the Binaryworks discord server!');
-
+ await message.reply('Your suggestion has been shown to the Andrew Lee Projects discord server!');
+
};
-
+
exports.conf = {
aliases: [],
guildOnly: false,
@@ -42,4 +42,4 @@ exports.help = {
usage: 'suggestfeature [suggestion]',
category: '- General Commands',
};
-
+
diff --git a/commands/userinfo.js b/commands/userinfo.js
index a812dc4..bc7ec8e 100644
--- a/commands/userinfo.js
+++ b/commands/userinfo.js
@@ -23,7 +23,7 @@ module.exports.run = async (client, message) => {
.setAuthor(message.author.tag, message.author.avatarURL())
.setDescription('User Information')
.setThumbnail(message.author.avatarURL())
- .addField('Names', `**Username:** ${message.author.username}\n**Current Nickname:** ${message.member.displayName}`)
+ .addField('Names', `**Display Name:** ${message.member.displayName}\n**Username:** ${message.author.username}\n**Server Nickname:** ${message.member.displayName}`)
.addField('Identity', `**User ID:** ${message.author.id} `)
.addField('Create and Join Times', `**Created At:** ${message.member.user.createdAt.toUTCString()}\n**Joined Guild At:** ${message.member.joinedAt.toUTCString()}`)
.setColor('#1fd619');