Blacklists / Topic Settings / many more changes

This commit is contained in:
ry 2020-01-03 17:27:32 +01:00
parent 3793241426
commit 34c1822e97
19 changed files with 317 additions and 131 deletions

View file

@ -0,0 +1,24 @@
const Command = require('../../src/structures/Command');
module.exports = class Blacklist extends Command {
constructor() {
super({
name: 'blacklist',
description: 'Master the Blacklist',
aliases: ['bl'],
module: 'Developers',
cooldown: 0,
guildOnly: false,
developerOnly: true
});
}
async command(ctx) {
console.log(ctx.args)
let ACTION = ctx.args[0]
let ID = ctx.args[1]
let REASON = ctx.args[2]
let X = await ctx.utils.db.blacklist(ID, ACTION, REASON)
console.log(X)
}
};

View file

@ -1,7 +1,9 @@
const Command = require("../../src/structures/Command");
const exec = require("shell-exec");
const dig = require("node-dig-dns");
const { MessageEmbed } = require("discord.js");
const {
MessageEmbed
} = require("discord.js");
let DomainReg = new RegExp(
`(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]`
);
@ -11,7 +13,7 @@ module.exports = class Dig extends Command {
name: "dig",
description: "dig website dns information stuff",
aliases: [],
module: "General",
module: "Developers",
cooldown: 10,
guildOnly: false,
developerOnly: true,
@ -40,4 +42,4 @@ module.exports = class Dig extends Command {
}
ctx.send(DIG);
}
};
};

View file

@ -0,0 +1,22 @@
const Command = require('../../src/structures/Command');
module.exports = class Crime extends Command {
constructor() {
super({
name: 'crime',
description: 'Commit crimes',
aliases: [],
module: 'Economy',
cooldown: 15,
guildOnly: true,
developerOnly: true,
nsfw: false
});
}
async command(ctx) {
ctx.utils.eco.quick('crime', ctx.author.id).then(r => {
ctx.send(r.text)
}).catch(error => ctx.send(`Error ${error.message}`))
}
}

View file

@ -16,7 +16,7 @@ module.exports = class Daily extends Command {
async command(ctx) {
ctx.utils.eco.Dailies().then(r => {
ctx.send(`**${r.amount}** has been added to your bank.`)
ctx.send(`**${r.amount}**<:coin:574116462260912138> has been added to your bank.`)
}).catch(error => ctx.send(`You can get your dailies in ${error.message}`))
}
}
}

View file

@ -16,7 +16,7 @@ module.exports = class Weekly extends Command {
async command(ctx) {
ctx.utils.eco.weekly().then(r => {
ctx.send(`**${r.amount}** has been added to your bank.`)
ctx.send(`**${r.amount}**<:coin:574116462260912138> has been added to your bank.`)
}).catch(error => ctx.send(`You can get your weeklies in ${error.message}`))
}
}
}

View file

@ -3,7 +3,7 @@ module.exports = class Work extends Command {
constructor() {
super({
name: 'work',
description: 'Get your Dailies',
description: 'Work for your money',
aliases: [],
module: 'Economy',
cooldown: 15,
@ -19,4 +19,4 @@ module.exports = class Work extends Command {
ctx.send(r.text)
}).catch(error => ctx.send(`Error ${error.message}`))
}
}
}

View file

@ -1,6 +1,8 @@
const Command = require('../../src/structures/Command');
const { MessageEmbed, version: DiscordVersion } = require('discord.js');
const { developers, contributors, source, color } = require('../../config');
const {
MessageEmbed,
version: DiscordVersion
} = require('discord.js');
const db = require('quick.db');
const Backend = new db.table('backend');
module.exports = class Info extends Command {
@ -8,7 +10,7 @@ module.exports = class Info extends Command {
super({
name: 'info',
description: 'Show the Makers and Contributors of the Bot',
aliases: [ 'about' ],
aliases: ['about'],
module: 'General',
cooldown: 0,
guildOnly: false,
@ -18,8 +20,18 @@ module.exports = class Info extends Command {
async command(ctx) {
let result;
const {
developers,
contributors,
source,
color
} = ctx.vars
const contribs = [];
for (const { id, nick, reason } of contributors) {
for (const {
id,
nick,
reason
} of contributors) {
const user = await ctx.client.users.fetch(id);
contribs.push(`${user} (${nick}) - ${reason}`);
}
@ -50,4 +62,4 @@ module.exports = class Info extends Command {
ctx.send(CreditEmbed);
}
};
};

View file

@ -1,10 +1,15 @@
const Command = require('../../src/structures/Command');
function Toggle(bool, ctx) {
return bool ? `${ctx.utils.emotes.settings.on}*_ _*` : `${ctx.utils.emotes.settings.off}*_ _*`
}
module.exports = class Settings extends Command {
constructor() {
super({
name: 'settings',
description: 'Show the Settings of this Server',
aliases: [ 'config' ],
aliases: ['config'],
module: 'Settings',
cooldown: 5,
guildOnly: true,
@ -12,6 +17,7 @@ module.exports = class Settings extends Command {
});
}
async command(ctx) {
const SettingsEmbed = new ctx.utils.discord.MessageEmbed();
SettingsEmbed.setColor(ctx.config.color);
@ -22,24 +28,19 @@ module.exports = class Settings extends Command {
.addField('Prefixes', Server.prefix.join(', ') || `<@${ctx.client.user.id}> or \`'\``, false)
.addField(
'SourceFynnder',
Server.SourceFynnder ? ctx.utils.emotes.settings.on : ctx.utils.emotes.settings.off,
true
Toggle(Server.SourceFynnder, ctx), true
)
.addField(
'Shortlinks',
Server.Shortlinks ? ctx.utils.emotes.settings.on : ctx.utils.emotes.settings.off,
true
)
Toggle(Server.Shortlinks, ctx), true)
.addBlankField(true)
.addField(
'Image Embeds',
Server.embeds ? ctx.utils.emotes.settings.on : ctx.utils.emotes.settings.off,
true
Toggle(Server.embeds, ctx), true
)
.addField(
'Image Text',
Server.rp_text ? ctx.utils.emotes.settings.on : ctx.utils.emotes.settings.off,
true
Toggle(Server.rp_text, ctx), true
);
// .addField('Default Yiff', Server.default_yiff, true);
ctx.send(SettingsEmbed);
@ -51,4 +52,4 @@ module.exports = class Settings extends Command {
ctx.send(SettingsEmbed);
}
}
};
};