DBL is total garbage

This commit is contained in:
Dragon Fire
2020-04-28 09:07:54 -04:00
parent b2f86615c8
commit 1817c6e990
10 changed files with 7 additions and 34 deletions
+1 -4
View File
@@ -35,10 +35,7 @@ module.exports = class CleverbotCommand extends Command {
}
async run(msg, { text }, fromPattern) {
if (fromPattern) {
if (msg.guild && this.client.botListGuilds.includes(msg.guild.id)) return null;
text = msg.patternMatches[2];
}
if (fromPattern) text = msg.patternMatches[2];
try {
const convo = this.convos.get(msg.channel.id);
const { body } = await request
+3 -11
View File
@@ -10,22 +10,14 @@ module.exports = class GenerateCommandsCommand extends Command {
description: 'Generates the commands list for Xiao\'s README.',
details: 'Only the bot owner(s) may use this command.',
ownerOnly: true,
guarded: true,
args: [
{
key: 'botList',
prompt: 'Do you want to generate the bot list version of the command list?',
type: 'boolean',
default: false
}
]
guarded: true
});
}
run(msg, { botList }) {
run(msg) {
const list = this.client.registry.groups
.map(g => {
const commands = g.commands.filter(c => !c.hidden && (botList ? !c.ownerOnly && !c.nsfw : true));
const commands = g.commands.filter(c => !c.hidden);
return `\n### ${g.name}:\n\n${commands.map(c => {
const extra = `${c.ownerOnly ? ' (Owner-Only)' : ''}${c.nsfw ? ' (NSFW)' : ''}`;
return `* **${c.name}:** ${c.description}${extra}`;
-4
View File
@@ -34,10 +34,6 @@ module.exports = class HelpCommand extends Command {
const commands = group.commands.filter(cmd => {
if (owner) return true;
if (cmd.ownerOnly || cmd.hidden) return false;
const inBotList = msg.guild && this.client.botListGuilds.includes(msg.guild.id);
if (inBotList && cmd instanceof AutoReplyCommand) {
return false;
}
return true;
});
if (!commands.size) continue;
-1
View File
@@ -17,7 +17,6 @@ module.exports = class UnknownCommandCommand extends Command {
run(msg) {
if (!msg.guild) return null;
if (msg.guild && this.client.botListGuilds.includes(msg.guild.id)) return null;
const commands = this.makeCommandArray(this.client.isOwner(msg.author), msg.channel.nsfw);
const command = msg.content.match(this.client.dispatcher._commandPatterns[this.client.commandPrefix]);
const str = command ? command[2] : msg.content.split(' ')[0];