Compare commits

...

17 commits
master ... v4

Author SHA1 Message Date
ry
6ca25ec24d forgot to add something 2020-02-16 22:44:01 +01:00
ry
c0bca7cf4e formatting 2020-02-16 22:42:41 +01:00
ry
654e2a23a6 remove error catch thing 2020-02-16 22:37:27 +01:00
ry
6de4923bfd hhhhhh 2020-02-16 22:34:23 +01:00
ry
1fc65fe2cf less checks 2020-02-16 22:29:41 +01:00
ry
47306dac56 comment blacklist stuff 2020-02-16 22:27:14 +01:00
ry
adffee8a9b more logs 2020-02-16 22:23:31 +01:00
ry
8aa1b361ca log stuff 2020-02-16 22:20:32 +01:00
ry
35b73e99ad modules 2020-02-16 22:08:05 +01:00
ry
458f9a51c4 package 2020-02-16 21:59:13 +01:00
ry
a95ad69856 fuck package.json 2020-02-16 21:51:02 +01:00
ry
c77b8b0ced AAAA 2020-02-16 21:40:41 +01:00
ry
0e153cf124 messages uwu 2020-02-16 21:37:41 +01:00
ry
2fcfea7cbf forgot to replace 2020-02-16 21:11:34 +01:00
ry
126ef9c493 typo 2020-02-16 21:10:44 +01:00
ry
db9b3fda7e wow 2020-02-16 21:04:28 +01:00
ry
26236cf8a5 v4 startin now 2020-02-16 20:30:02 +01:00
72 changed files with 657 additions and 7851 deletions

View file

@ -14,12 +14,12 @@ module.exports = {
run: async (client, Message) => {
if (Message.author.bot) return;
if (!Message.guild) return;
if (Message.author.id !== '318044130796109825') return;
//if (Message.author.id !== '318044130796109825') return;
let UserFromDB = await db.blacklist(Message.author.id, 's')
if (UserFromDB.state) return;
// let UserFromDB = await db.blacklist(Message.author.id, 's')
//if (UserFromDB.state) return;
await eco.CalculateFromMessage(Message)
// await eco.CalculateFromMessage(Message)
// console.log(Message)
}
}

View file

@ -18,9 +18,9 @@ module.exports = {
run: async (client, Message) => {
if (Message.author.bot) return;
let UserFromDB = await db.blacklist(Message.author.id, 's')
if (UserFromDB.state) return;
if (topic.includesSetting('thaldrin.no-SL', Message.channel.topic)) return;
/* let UserFromDB = await db.blacklist(Message.author.id, 's')
if (UserFromDB.state) return; */
//if (topic.includesSetting('thaldrin.no-SL', Message.channel.topic)) return;
let Server = Servers.get(Message.guild.id);
@ -30,6 +30,6 @@ module.exports = {
} else {
Enabled = Server.Shortlinks;
}
ShortLinks(Enabled, Message);
ShortLinks(Enabled = true, Message);
}
};

View file

@ -21,10 +21,10 @@ module.exports = {
run: async (client, Message) => {
if (Message.author.bot) return;
let UserFromDB = await db.blacklist(Message.author.id, 's')
/* let UserFromDB = await db.blacklist(Message.author.id, 's')
if (UserFromDB.state) return;
if (topic.includesSetting('thaldrin.no-SF', Message.channel.topic)) return;
*/
//if (topic.includesSetting('thaldrin.no-SF', Message.channel.topic)) return;
let Server = Servers.get(Message.guild.id);
let Enabled;
@ -33,6 +33,6 @@ module.exports = {
} else {
Enabled = Server.SourceFynnder;
}
SourceFynnder(Enabled, Message);
SourceFynnder(Enabled = true, Message);
}
};

View file

@ -20,11 +20,7 @@ module.exports = {
name: 'message',
run: async (client, msg) => {
if (msg.author.bot) return;
//if (msg.author.id !== '318044130796109825') return;
//console.log(msg.author.tag)
let UserFromDB = await db.blacklist(msg.author.id, 's')
if (UserFromDB.state) return;
const DefaultPrefix = client.config.prefixes;
const CustomPrefix = Servers.get(msg.guild.id);
if (!CustomPrefix) {
@ -42,7 +38,7 @@ module.exports = {
}
if (!EXISTS) return;
//console.log(topic.includesSetting('thaldrin.no-cmds', msg.channel.topic))
if (topic.includesSetting('thaldrin.no-cmd', msg.channel.topic)) return;
//if (topic.includesSetting('thaldrin.no-cmd', msg.channel.topic)) return;
const args = msg.content.slice(PrefixArray[PREFIX].length).trim().split(/ +/g);
const command = args.shift().toLowerCase();
@ -113,34 +109,35 @@ module.exports = {
cmd.command(ctx).then(async () => {
if (!ctx.config.type.beta) ctx.client.channels.find(c => c.id === vars.logs.usage).send(`${ctx.utils.format.bold(ctx.author.tag)} (${ctx.utils.format.code(ctx.author.id)}) used ${ctx.utils.format.code(cmd.name)} in ${ctx.utils.format.bold(ctx.guild.name)} (${ctx.utils.format.code(ctx.guild.id)}) `).catch(e => console.log(e))
await ctx.db.backend.add(`usage.${cmd.name}`, 1)
}).catch((err) => {
if (!cmd.name === 'e926' || !cmd.name === 'e621') {
trello
.addCard(
cmd.name + ' | ' + err.message,
`Full Error:
${err}
}).catch(err => console.error(err))
/* .catch((err) => {
if (!cmd.name === 'e926' || !cmd.name === 'e621') {
trello
.addCard(
cmd.name + ' | ' + err.message,
`Full Error:
${err}
Content: ${ctx.msg.content}
Author: ${msg.author.tag} (${msg.author.id})
Server: ${msg.guild.name} (${msg.guild.id})`,
config.trello.boards.errors
)
.then((r) => {
trello
.addLabelToCard(r.id, config.trello.labels.errors)
.catch((error) => console.log(error));
})
.catch((err) => console.log(err));
}
//console.warn(err.message);
let ErrorEmb = new MessageEmbed();
ErrorEmb.setTitle(`${cmd.name} encountered an Error`)
.setDescription(`\`${err.message}\`\n\n\`${err}\``)
.setColor('RED');
return ctx.send(ErrorEmb);
});
Content: ${ctx.msg.content}
Author: ${msg.author.tag} (${msg.author.id})
Server: ${msg.guild.name} (${msg.guild.id})`,
config.trello.boards.errors
)
.then((r) => {
trello
.addLabelToCard(r.id, config.trello.labels.errors)
.catch((error) => console.log(error));
})
.catch((err) => console.log(err));
}
//console.warn(err.message);
let ErrorEmb = new MessageEmbed();
ErrorEmb.setTitle(`${cmd.name} encountered an Error`)
.setDescription(`\`${err.message}\`\n\n\`${err}\``)
.setColor('RED');
return ctx.send(ErrorEmb);
}); */
}
}
};

View file

@ -1,7 +1,3 @@
const {
log,
status
} = require('../utils');
const config = require('../config');
const blapi = require('blapi');
//blapi.setLogging(true);
@ -14,10 +10,12 @@ module.exports = {
if (client.user.id === '434662676547764244') {
blapi.handle(client, config.apis);
}
log.hasStarted();
status.randomStatus(client)
//log.hasStarted();
console.log('The Bot is online')
/* status.randomStatus(client)
setInterval(() => {
status.randomStatus(client);
}, 60000);
*/
}
};

View file

@ -1,4 +1,6 @@
const { logChannel } = require("../config");
const {
logChannel
} = require("../config");
const util = require("../utils");
module.exports = {
@ -9,8 +11,10 @@ module.exports = {
client.options.shards.length - 1
] + 1}/${client.options.shards.length} is ready`;
await util.log.shardReady(message);
await util.log.shardSpinnerStarted(message);
console.log(message)
//await util.log.shardReady(message);
//await util.log.shardSpinnerStarted(message);
// if (logs !== undefined) logs.send(message);
}
};
};

View file

@ -1,22 +0,0 @@
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

@ -1,22 +0,0 @@
const Command = require('../../src/structures/Command');
module.exports = class Daily extends Command {
constructor() {
super({
name: 'daily',
description: 'Get your Dailies',
aliases: ['d'],
module: 'Economy',
cooldown: 5,
guildOnly: true,
developerOnly: true,
nsfw: false
});
}
async command(ctx) {
ctx.utils.eco.Dailies().then(r => {
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

@ -1,22 +0,0 @@
const Command = require('../../src/structures/Command');
module.exports = class Weekly extends Command {
constructor() {
super({
name: 'weekly',
description: 'Get your Dailies',
aliases: ['w'],
module: 'Economy',
cooldown: 5,
guildOnly: true,
developerOnly: true,
nsfw: false
});
}
async command(ctx) {
ctx.utils.eco.weekly().then(r => {
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

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

View file

@ -1,48 +0,0 @@
const Command = require('../../src/structures/Command');
const D = require('discord.js');
module.exports = class Bug extends Command {
constructor() {
super({
name: 'bug',
description: 'Report a Bug in the bot',
aliases: [ 'report', 'bugreport' ],
module: 'General',
cooldown: 10,
guildOnly: false,
developerOnly: false,
nsfw: false
});
}
async command(ctx) {
/* throw new Error('Testing'); */
let abuse = new D.MessageEmbed()
.setTitle('Misuse of Command')
.setDescription(
`Please make sure to make your Suggestion as Detailed as possible.\n\nAbuse of this command will lead to complete denial of command usage.`
);
if (ctx.args.length < 1) {
return ctx.send(abuse);
}
ctx.trello
.addCard(
ctx.args.join(' '),
`
Author: ${ctx.author.tag} (${ctx.author.id})
Server: ${ctx.guild.name} (${ctx.guild.id})`,
ctx.config.trello.boards.bugs
)
.then((r) => {
ctx.trello.addLabelToCard(r.id, ctx.config.trello.labels.bugs).catch(console.error);
let reply = new D.MessageEmbed()
.setTitle('Report Received')
.setColor(ctx.config.color)
.setDescription(ctx.args.join(' '))
.addField('URL', r.url, true)
.setThumbnail(ctx.client.user.avatarURL());
ctx.send(reply);
});
}
};

View file

@ -1,48 +0,0 @@
const Command = require('../../src/structures/Command');
module.exports = class Changelog extends Command {
constructor() {
super({
name: 'changelog',
description: 'View the latest changes of the bot',
aliases: ['chl', 'c'],
module: 'Developers',
cooldown: 5,
guildOnly: false,
developerOnly: true,
nsfw: false
});
}
async command(ctx) {
let isDev;
if (ctx.vars.developers.find((dev) => ctx.author.id == dev.id)) isDev = true
const ValidActions = /(set|view)/g
let action = ctx.args[0]
ctx.args.shift()
if (!action.match(ValidActions)) return ctx.send(`You can only ${isDev ? ctx.utils.format.code('view/set'): ctx.utils.format.code('view')} a Changelog`)
// ctx.db.backend.get()
let Changelog = ctx.args.join(' ').split('|')
let version = Changelog[0].replace(/\./g, '_')
let text = Changelog[1]
// console.log(action, version, text)
if (action === 'set') {
if (!isDev) return;
await ctx.db.backend.set(version.trim(), text)
ctx.send('Changelog set, posting...')
ctx.client.channels.find(c => c.id == '572515873156235307').send(`**__Version ${version.replace(/\_/g, '.')}__**\n\n${text.trim()}`)
return ctx.send('Sent.')
} else if (action === 'view') {
let Change = ctx.db.backend.get(version)
if (Change === null) return ctx.send(`That is not a valid Version (or it's not in my Database).\nMy latest version is ${ctx.utils.format.bold(ctx.vars.version)}.`)
ctx.send(`**__Version ${version.replace(/\_/g, '.')}__**\n\n${Change}`)
}
}
}

View file

@ -1,159 +0,0 @@
const Command = require("../../src/structures/Command");
const {
MessageEmbed
} = require("discord.js");
function CapFirstLetter(string) {
if (typeof string == undefined) return;
var firstLetter = string[0] || string.charAt(0);
return firstLetter ? firstLetter.toUpperCase() + string.slice(1) : "";
}
module.exports = class nHelp extends Command {
constructor() {
super({
name: "help",
description: "View a list of available commands or information on a specific command.",
aliases: ['h', '?'],
module: "General",
cooldown: 0,
guildOnly: false,
developerOnly: false
});
}
async command(ctx) {
let Help = new MessageEmbed();
const commands = {
General: {
cs: ctx.client.commands
.filter(command => command.module == "General")
.map(c => c),
name: "General"
},
Settings: {
cs: ctx.client.commands
.filter(command => command.module == "Settings")
.map(c => c),
name: "Settings"
},
Images: {
cs: ctx.client.commands
.filter(command => command.module == "Images")
.map(c => c),
name: "Images"
},
Roleplay: {
cs: ctx.client.commands
.filter(command => command.module == "Roleplay")
.map(c => c),
name: "Roleplay"
}
};
let lengths = [];
let names = ["General", "Settings", "Images", "Roleplay"];
for (const i in commands) {
if (commands.hasOwnProperty(i)) {
const c = commands[i];
lengths.push(c.cs.length);
}
}
let start = 0;
Help.setAuthor(ctx.author.tag, ctx.author.avatarURL())
.setTitle("Command Help")
.setTimestamp(new Date())
.setColor(ctx.vars.color)
.setFooter(`${ctx.client.user.username}`, ctx.client.user.avatarURL());
if (ctx.args.length === 0) {
lengths.forEach(c => {
Help.addField(
`${names[start]} (${c})`,
`${ctx.utils.format.code(`'help --${names[start].toLowerCase()}`)}`,
true
);
start++;
});
return ctx.send(Help);
}
let category, cmd;
if (ctx.args.length > 0) {
category = ctx.args[0].slice(2);
cmd = ctx.args[1];
}
if (commands.hasOwnProperty(CapFirstLetter(category))) {
let short = [];
let long = [];
commands[`${CapFirstLetter(category)}`].cs.forEach(c => {
short.push(`${ctx.utils.format.code(c.name)} - ${c.description}`);
long.push(c);
});
if (ctx.args.length === 2) {
let c = long.filter(
c =>
c.name === cmd.toLowerCase() ||
(c.aliases && c.aliases.includes(cmd.toLowerCase()))
);
let Text;
if (c.length === 0) {
Text = "There is no command with that name in this category.";
Help.setDescription(Text);
return ctx.send(Help);
} else {
let fields = [{
name: "Module",
value: c[0].module,
inline: true
},
{
name: "Aliases",
value: c[0].aliases.length == 0 ?
"No aliases" : c[0].aliases.join(", "),
inline: true
},
{
name: "Cooldown",
value: c[0].cooldown == 0 ? "No cooldown" : `${c[0].cooldown}s`,
inline: true
},
{
name: "Server only?",
value: c[0].guildOnly ? "Yes" : "No",
inline: true
},
{
name: "Permissions needed",
value: c[0].AuthorPermissions ? c[0].AuthorPermissions : "None",
inline: true
},
{
name: "Developers only?",
value: c[0].developerOnly ? "Yes" : "No",
inline: true
}
];
fields.forEach(i => {
Help.addField(i.name, i.value, i.inline);
});
return ctx.send(Help);
}
} else {
Help.setDescription(
`Use \n${ctx.utils.format.code(
`'help --<cagegory> <command or alias> to get help on a specific command`
)}\n\n${short.join("\n")}`
);
return ctx.send(Help);
}
} else {
Help.setDescription("This Category does not exist");
return ctx.send(Help);
}
}
};

View file

@ -1,65 +0,0 @@
const Command = require('../../src/structures/Command');
const {
MessageEmbed,
version: DiscordVersion
} = require('discord.js');
const db = require('quick.db');
const Backend = new db.table('backend');
module.exports = class Info extends Command {
constructor() {
super({
name: 'info',
description: 'Show the Makers and Contributors of the Bot',
aliases: ['about'],
module: 'General',
cooldown: 0,
guildOnly: false,
developerOnly: false
});
}
async command(ctx) {
let result;
const {
developers,
contributors,
source,
color
} = ctx.vars
const contribs = [];
for (const {
id,
nick,
reason
} of contributors) {
const user = await ctx.client.users.fetch(id);
contribs.push(`${user} (${nick}) - ${reason}`);
}
const Contributors = contribs.join('\n');
let CreditEmbed = new MessageEmbed()
.setTitle(`${ctx.client.user.username}, a Random Image and Utility Bot`)
.setColor(color)
.setDescription(
`Made by ${ctx.utils.format.bold(
ctx.client.users.find((user) => user.id === '318044130796109825').tag
)}`
)
/* .addField('Language', 'Javascript', true)
.addField('Library', `d.js - v${DiscordVersion}`, true)
.addField('Node', `${process.version}`, true)
.addField('Servers', ctx.client.guilds.size, true)
.addField('Users', ctx.client.users.size, true) */
.addField('Contributors', Contributors)
.addField('Source', `[gd/r/thaldrin](${source})`, true)
.addField(
'Support Server',
`[${ctx.client.guilds.get('438316852347666432').name}](https://discord.gg/${ctx.db.backend.get(
'Info.invite'
)})`,
true
)
.addField('Website', `[thaldr.in](https://thaldr.in)`, true);
ctx.send(CreditEmbed);
}
};

View file

@ -1,22 +0,0 @@
const Command = require('../../src/structures/Command');
const D = require('discord.js');
module.exports = class Invite extends Command {
constructor() {
super({
name: 'invite',
description: 'Get the Bot Invite.',
module: 'General',
cooldown: 0,
guildOnly: false,
developerOnly: false
});
}
async command(ctx) {
const Embed = new D.MessageEmbed()
.setDescription(`**[Invite Me!](https://thaldr.in/invite)**`)
.setColor(ctx.config.color)
.setFooter(`${ctx.client.user.username}`, ctx.client.user.avatarURL());
return ctx.send(Embed);
}
};

View file

@ -1,27 +0,0 @@
const Command = require('../../src/structures/Command');
module.exports = class Ping extends Command {
constructor() {
super({
name: 'ping',
description: 'Pings Discord to check the API and gateway latency.',
aliases: [],
module: 'General',
cooldown: 0,
guildOnly: false,
developerOnly: false
});
}
async command(ctx) {
const m = await ctx.send(`Pinging..`);
const rest = Math.round(m.createdTimestamp - ctx.msg.createdTimestamp);
const ws = Math.round(ctx.client.ws.ping);
const shard = Math.round(ctx.guild.shard.ping);
return m.edit(`REST ${rest / 1000}s (${rest}ms)\nWS ${ws / 1000}s (${ws}ms)`);
}
}
// \nShard Avg. ${shard / 1000}s (${shard}ms) [${ctx.guild.shard.pings.join(', ')}]

View file

@ -1,70 +0,0 @@
const Command = require('../../src/structures/Command');
module.exports = class ServerInfo extends Command {
constructor() {
super({
name: 'serverinfo',
description: 'Shows Information about your Server!',
aliases: [ 'server', 'sinfo', 'si' ],
module: 'General',
cooldown: 0,
guildOnly: true,
developerOnly: false
});
}
async command(ctx) {
const total = ctx.guild.members.size;
const users = ctx.guild.members.filter((m) => !m.user.bot).size;
const bots = ctx.guild.members.filter((m) => m.user.bot).size;
const Features = ctx.guild.features;
let OnlineUsers =
ctx.utils.emotes.MemberStatus['online'] +
ctx.guild.members.filter((m) => m.presence.status === 'online').size;
let DNDUsers =
ctx.utils.emotes.MemberStatus['dnd'] + ctx.guild.members.filter((m) => m.presence.status === 'dnd').size;
let IdleUsers =
ctx.utils.emotes.MemberStatus['idle'] + ctx.guild.members.filter((m) => m.presence.status === 'idle').size;
let OfflineUsers =
ctx.utils.emotes.MemberStatus['offline'] +
ctx.guild.members.filter((m) => m.presence.status === 'offline').size;
let features = [];
Features.forEach((f) => features.push(ctx.utils.emotes.features[f.toLowerCase()] || f));
let Embed = new ctx.utils.discord.MessageEmbed();
Embed.setTitle(ctx.guild.name)
.setColor(ctx.config.color)
.setThumbnail(ctx.guild.iconURL())
.addField(
'Members',
`${ctx.utils.format.bold(`Total:`)} ${ctx.utils.format.code(total)}\n${ctx.utils.format.bold(
`Users:`
)} ${ctx.utils.format.code(users)}\n${ctx.utils.format.bold(`Bots:`)} ${ctx.utils.format.code(bots)}
${OnlineUsers}
${DNDUsers}
${IdleUsers}
${OfflineUsers}`
)
.addField('Owner', ctx.guild.owner, true)
.addField('Large?', ctx.guild.large ? ctx.utils.emotes.settings.on : ctx.utils.emotes.settings.off, true)
.addField(
'Boost Level / Boosters',
`${ctx.guild.premiumTier} / ${ctx.guild.premiumSubscriptionCount}`,
true
)
.addField('Region', ctx.utils.emotes.regions[ctx.guild.region] || ctx.guild.region, true)
.addField('Features', features.join(' **|** ') || 'None');
if (ctx.guild.vanityURLCode) {
Embed.addField(
'Vanity URL',
`[discord.gg/${ctx.guild.vanityURLCode}](https://discord.gg/${ctx.guild.vanityURLCode})`
);
}
/* .addField('Large?')
.addField('Large?'); */
ctx.send(Embed);
}
};

View file

@ -1,63 +0,0 @@
const Command = require('../../src/structures/Command');
const {
MessageEmbed: Embed
} = require('discord.js')
module.exports = class Statistics extends Command {
constructor() {
super({
name: 'statistics',
description: 'Get in-depth bot Stats',
aliases: ['stats'],
module: 'General',
cooldown: 5,
guildOnly: false,
developerOnly: false,
nsfw: false
});
}
async command(ctx) {
let StatisticsEmbed = new Embed().setTitle(`${ctx.vars.name} v${ctx.vars.version} Statistics`).setColor(ctx.vars.color)
var SortUsage = [];
var SortSL = [];
var SortSF = [];
let usage = ctx.db.backend.get('usage')
let Shortlink = ctx.db.backend.get('Shortlink')
let SourceFynnder = ctx.db.backend.get('SourceFynnder')
// change data value to the one you showed in pic
for (var type in usage) {
SortUsage.push([type, usage[type]]);
}
for (var type in Shortlink) {
SortSL.push([type, Shortlink[type]]);
}
for (var type in SourceFynnder) {
SortSF.push([type, SourceFynnder[type]]);
}
let usages = SortUsage.sort((a, b) => b[1] - a[1])
let SLs = SortSL.sort((a, b) => b[1] - a[1])
let SFs = SortSF.sort((a, b) => b[1] - a[1])
let UsageStats = ''
let SLStats = ''
let SFStats = ''
usages.forEach(use => {
UsageStats += `${ctx.utils.format.bold(use[0])} - \`${use[1]}\`\n`
})
SLs.forEach(SL => {
SLStats += `${ctx.utils.format.bold(SL[0])} - \`${SL[1]}\`\n`
})
SFs.forEach(SF => {
SFStats += `${ctx.utils.format.bold(SF[0]).replace(/found/g,'Found w/')} - \`${SF[1]}\`\n`
})
StatisticsEmbed.addField("Uptime", `${ctx.utils.format.uptime(process.uptime())}`, true)
.addField("Servers", ctx.client.guilds.size, true)
.addField("Users", ctx.client.users.size, true)
.addField('Command Usage', UsageStats, true)
.addField('Shortlink Usage', SLStats, true)
.addField('SourceFynnder Usage', SFStats.replace(/Found w\//, 'Total'), true)
ctx.send(StatisticsEmbed)
}
}

View file

@ -1,57 +0,0 @@
const Command = require('../../src/structures/Command');
const D = require('discord.js');
module.exports = class Suggest extends Command {
constructor() {
super({
name: 'suggest',
description: 'Suggest something for the Bot',
aliases: [ 'sug', 'suggestion' ],
module: 'General',
cooldown: 10,
guildOnly: false,
developerOnly: false,
nsfw: false
});
}
async command(ctx) {
/* throw new Error('Testing'); */
let Misuse = new D.MessageEmbed()
.setTitle('Misuse of Command')
.setDescription(
`There was
Please make sure to make your Suggestion as Detailed as possible.\n\nAbuse of this command will lead to complete denial of command usage.`
);
if (ctx.args.length < 1) {
return ctx.send(abuse);
}
let Suggestion = ctx.args.join(' ').split('|')
if (Suggestion.length < 2) return ctx.send(`Only the Title doesn't help, please add Text after the \`|\` to send me your Suggestion`)
if (Suggestion[1] === '') return ctx.send(`Only the Title doesn't help, please add Text after the \`|\` to send me your Suggestion`)
ctx.trello
.addCard(
Suggestion[0],
`
${Suggestion[1]}
Author: ${ctx.author.tag} (${ctx.author.id})
Server: ${ctx.guild.name} (${ctx.guild.id})`,
ctx.config.trello.boards.suggestions
)
.then((r) => {
ctx.trello.addLabelToCard(r.id, ctx.config.trello.labels.suggestions).catch(console.error);
let reply = new D.MessageEmbed()
.setTitle('Suggestion Received')
.setColor(ctx.config.color)
.setDescription(ctx.args.join(' '))
.addField('URL', r.url, true)
.setThumbnail(ctx.client.user.avatarURL());
ctx.send(reply);
});
}
};

View file

@ -1,54 +0,0 @@
const Command = require("../../src/structures/Command");
const { MessageEmbed, version: DiscordVersion } = require("discord.js");
const { developers, contributors, source, color } = require("../../config");
const os = require("os");
const db = require("quick.db");
const Backend = new db.table("backend");
function format(seconds) {
function pad(s) {
return (s < 10 ? "0" : "") + s;
}
var hours = Math.floor(seconds / (60 * 60));
var minutes = Math.floor((seconds % (60 * 60)) / 60);
var seconds = Math.floor(seconds % 60);
return pad(hours) + "h " + pad(minutes) + "m " + pad(seconds) + "s";
}
module.exports = class Info extends Command {
constructor() {
super({
name: "system",
description: "Show System Info",
aliases: ["sys", "sysinfo"],
module: "General",
cooldown: 0,
guildOnly: false,
developerOnly: false
});
}
async command(ctx) {
let SystemEmbed = new MessageEmbed()
.setTitle(`${ctx.client.user.username} | v${ctx.vars.version}`)
.setColor(color)
.setDescription(
`Made by ${ctx.utils.format.bold(
ctx.client.users.find(user => user.id === "318044130796109825").tag
)}`
)
.addField("Language", "Javascript", true)
.addField("Library", `d.js - v${DiscordVersion}`, true)
.addField("Uptime", `${format(process.uptime())}`, true)
.addField("Node", `${process.version}`, true)
.addField("Servers", ctx.client.guilds.size, true)
.addField("Users", ctx.client.users.size, true)
.addField(
"Total sauce found",
ctx.db.backend.get("SourceFynnder.found"),
true
);
ctx.send(SystemEmbed);
}
};

View file

@ -1,59 +0,0 @@
const Command = require('../../src/structures/Command');
module.exports = class Userinfo extends Command {
constructor() {
super({
name: 'userinfo',
description: 'Shows User Information',
aliases: [ 'user', 'ui', 'uinfo' ],
module: 'General',
cooldown: 2,
guildOnly: true,
developerOnly: false,
nsfw: false
});
}
async command(ctx) {
let User;
let Game;
let Embed = new ctx.utils.discord.MessageEmbed();
User = ctx.msg.mentions.members.first() || /* ctx.args[0] || */ ctx.member;
if (User.presence.activity === null) {
Game = 'Playing Nothing';
} else {
if (User.presence.activity.name === 'Custom Status') {
Game = `• ${User.presence.activity.state || 'Error'}`;
} else {
if (User.presence.activity.details === null) {
User.presence.activity.details = '*_ _*';
User.presence.activity.state = '*_ _*';
} else {
Game = `
${User.presence.activity.name}
${User.presence.activity.details}
${User.presence.activity.state}`;
}
}
}
let Roles = [];
let x = 0;
for (const role of User.roles) {
Roles.push(`<@&${role[0]}>`);
}
Embed.setTitle(`Info on ${User.nickname || User.user.username}`)
.setColor(ctx.config.color)
.addField('Username', User.user.tag, true)
.addField('ID', User.user.id, true)
.addField(`Status | ${ctx.utils.emotes.status[User.presence.status]}`, Game);
if (Roles.length > 15) {
Embed.addField(`Roles [${Roles.length}]`, 'Too many to list' || 'Error');
} else {
Embed.addField(`Roles [${Roles.length}]`, Roles.join(' **|** '));
}
Embed.setThumbnail(User.user.avatarURL());
ctx.send(Embed).catch((err) => ctx.send('```js\n' + err + '```'));
}
};

View file

@ -1,41 +0,0 @@
const Command = require('../../src/structures/Command');
const yiff = require('yiff');
const { MessageEmbed } = require('discord.js');
module.exports = class Birb extends Command {
constructor() {
super({
name: 'bird',
description: 'Get a random birb',
aliases: [ 'birb' ],
module: 'Images',
cooldown: 2,
guildOnly: false,
developerOnly: false,
nsfw: false
});
}
async command(ctx) {
const Server = await ctx.db.servers.get(ctx.guild.id);
let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
let req;
let Message;
await yiff.shibe.birds().then((E) => (req = E));
if (Settings.embeds) {
Message = new MessageEmbed()
.setColor(ctx.config.color)
.setImage(req)
.setFooter(`${ctx.client.user.username} - Provided by shibe.online`, ctx.client.user.avatarURL());
} else {
Message = `${req}`;
}
ctx.send(Message);
}
};

View file

@ -1,41 +0,0 @@
const Command = require('../../src/structures/Command');
const yiff = require('yiff');
const { MessageEmbed } = require('discord.js');
module.exports = class Cat extends Command {
constructor() {
super({
name: 'cat',
description: 'Get a random cat',
aliases: [ 'meow' ],
module: 'Images',
cooldown: 2,
guildOnly: false,
developerOnly: false,
nsfw: false
});
}
async command(ctx) {
const Server = await ctx.db.servers.get(ctx.guild.id);
let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
let req;
let Message;
await yiff.shibe.cats().then((E) => (req = E));
if (Settings.embeds) {
Message = new MessageEmbed()
.setColor(ctx.config.color)
.setImage(req)
.setFooter(`${ctx.client.user.username} - Provided by shibe.online`, ctx.client.user.avatarURL());
} else {
Message = `${req}`;
}
ctx.send(Message);
}
};

View file

@ -1,46 +0,0 @@
const Command = require('../../src/structures/Command');
const yiff = require('yiff');
const { MessageEmbed } = require('discord.js');
let Icon = 'https://werewoof.tech/e621.png';
module.exports = class E621 extends Command {
constructor() {
super({
name: 'e621',
description: 'Get Images from e621',
aliases: [ 'e6' ],
module: 'Images',
cooldown: 5,
guildOnly: false,
developerOnly: false,
nsfw: true
});
}
async command(ctx) {
let Embed = new MessageEmbed().setColor('RED');
if (ctx.args < 1) {
Embed.setTitle('Search Terms').setDescription('I need more tags than that to search for an Image.');
return ctx.send(Embed);
}
const Server = await ctx.db.servers.get(ctx.guild.id);
let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
let req;
let Message;
await yiff.e621.CubFilter(ctx.args.join(' ')).then((E) => (req = E));
if (Settings.embeds) {
Message = new MessageEmbed()
.setImage(req.image)
.setColor(ctx.config.color)
.setAuthor('e621.net', Icon, `https://e621.net/post/show/${req.postID}`)
.setFooter(`${ctx.client.user.username} - e621.net`, ctx.client.user.avatarURL());
} else {
Message = `<https://e621.net/post/show/${req.postID}>\n${req.image}`;
}
ctx.send(Message);
}
};

View file

@ -1,46 +0,0 @@
const Command = require('../../src/structures/Command');
const yiff = require('yiff');
const { MessageEmbed } = require('discord.js');
let Icon = 'https://werewoof.tech/e621.png';
module.exports = class E621 extends Command {
constructor() {
super({
name: 'e926',
description: 'Get Images from e621',
aliases: [ 'e9' ],
module: 'Images',
cooldown: 5,
guildOnly: false,
developerOnly: false,
nsfw: false
});
}
async command(ctx) {
let Embed = new MessageEmbed().setColor('RED');
if (ctx.args < 1) {
Embed.setTitle('Search Terms').setDescription('I need more tags than that to search for an Image.');
return ctx.send(Embed);
}
const Server = await ctx.db.servers.get(ctx.guild.id);
let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
let req;
let Message;
await yiff.e926.request(ctx.args.join(' ')).then((E) => (req = E));
if (Settings.embeds) {
Message = new MessageEmbed()
.setImage(req.image)
.setColor(ctx.config.color)
.setAuthor('e621.net', Icon, `https://e926.net/post/show/${req.postID}`)
.setFooter(`${ctx.client.user.username} - e926.net`, ctx.client.user.avatarURL());
} else {
Message = `<https://e926.net/post/show/${req.postID}>\n${req.image}`;
}
ctx.send(Message);
}
};

View file

@ -1,41 +0,0 @@
const Command = require('../../src/structures/Command');
const yiff = require('yiff');
const { MessageEmbed } = require('discord.js');
module.exports = class Fox extends Command {
constructor() {
super({
name: 'fox',
description: 'Get a random fox',
aliases: [ 'yip' ],
module: 'Images',
cooldown: 2,
guildOnly: false,
developerOnly: false,
nsfw: false
});
}
async command(ctx) {
const Server = await ctx.db.servers.get(ctx.guild.id);
let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
let req;
let Message;
await yiff.sheri.animals.fox().then((E) => (req = E));
if (Settings.embeds) {
Message = new MessageEmbed()
.setColor(ctx.config.color)
.setImage(req.url)
.setFooter(`${ctx.client.user.username} - Provided by sheri.bot`, ctx.client.user.avatarURL());
} else {
Message = `${req}`;
}
ctx.send(Message);
}
};

View file

@ -1,41 +0,0 @@
const Command = require('../../src/structures/Command');
const yiff = require('yiff');
const { MessageEmbed } = require('discord.js');
module.exports = class Shibe extends Command {
constructor() {
super({
name: 'shiba',
description: 'Get a random shibe',
aliases: [ 'shib', 'shibe' ],
module: 'Images',
cooldown: 2,
guildOnly: false,
developerOnly: false,
nsfw: false
});
}
async command(ctx) {
const Server = await ctx.db.servers.get(ctx.guild.id);
let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
let req;
let Message;
await yiff.shibe.shibes().then((E) => (req = E));