Browse Source

lots of changes

master
ry 6 months ago
parent
commit
f7fd3b99a4
60 changed files with 3036 additions and 885 deletions
  1. +4
    -3
      .vscode/Snippets.code-snippets
  2. +3
    -1
      .vscode/settings.json
  3. +121
    -0
      Dashboard/assets/css/main.css
  4. +9
    -0
      Dashboard/assets/css/main.css.map
  5. +116
    -0
      Dashboard/assets/css/main.scss
  6. BIN
      Dashboard/assets/images/icon.png
  7. +97
    -0
      Dashboard/server.js
  8. +75
    -84
      DiscordEvents/message.js
  9. +35
    -32
      DiscordEvents/messageReactionAdd.js
  10. +6
    -6
      DiscordEvents/ready.js
  11. +65
    -75
      DiscordModules/Developers/eval.js
  12. +29
    -30
      DiscordModules/Developers/reload.js
  13. +0
    -21
      DiscordModules/Developers/setup.js
  14. +16
    -15
      DiscordModules/Developers/stop.js
  15. +116
    -94
      DiscordModules/General/help.js
  16. +49
    -38
      DiscordModules/General/info.js
  17. +70
    -0
      DiscordModules/General/serverinfo.js
  18. +50
    -0
      DiscordModules/General/system.js
  19. +59
    -0
      DiscordModules/General/userinfo.js
  20. +41
    -0
      DiscordModules/Images/birb.js
  21. +41
    -0
      DiscordModules/Images/cat.js
  22. +43
    -55
      DiscordModules/Images/e621.js
  23. +46
    -0
      DiscordModules/Images/e926.js
  24. +41
    -0
      DiscordModules/Images/fox.js
  25. +42
    -0
      DiscordModules/Images/shibe.js
  26. +41
    -0
      DiscordModules/Images/wolf.js
  27. +65
    -0
      DiscordModules/Roleplay/bang.js
  28. +65
    -0
      DiscordModules/Roleplay/boop.js
  29. +59
    -0
      DiscordModules/Roleplay/bulge.js
  30. +66
    -0
      DiscordModules/Roleplay/cuddle.js
  31. +65
    -0
      DiscordModules/Roleplay/hold.js
  32. +54
    -0
      DiscordModules/Roleplay/hug.js
  33. +59
    -0
      DiscordModules/Roleplay/kiss.js
  34. +65
    -0
      DiscordModules/Roleplay/lick.js
  35. +65
    -0
      DiscordModules/Roleplay/ncuddle.js
  36. +65
    -0
      DiscordModules/Roleplay/nhold.js
  37. +64
    -0
      DiscordModules/Roleplay/nhug.js
  38. +64
    -0
      DiscordModules/Roleplay/nkiss.js
  39. +64
    -0
      DiscordModules/Roleplay/nlick.js
  40. +59
    -0
      DiscordModules/Settings/prefix.js
  41. +51
    -59
      DiscordModules/Settings/settings.js
  42. +75
    -0
      DiscordModules/Settings/toggle.js
  43. +9
    -7
      index.js
  44. BIN
      json.sqlite
  45. +253
    -4
      package-lock.json
  46. +29
    -25
      package.json
  47. +2
    -2
      run.sh
  48. +0
    -39
      server/server.js
  49. +53
    -59
      src/client/Client.js
  50. +12
    -10
      src/structures/Command.js
  51. +14
    -9
      utils/index.js
  52. +125
    -101
      utils/src/database.js
  53. +15
    -0
      utils/src/economy.js
  54. +70
    -35
      utils/src/emotes.js
  55. +9
    -6
      utils/src/format.js
  56. +59
    -0
      utils/src/interactions.js
  57. +68
    -45
      utils/src/shortlinks.js
  58. +32
    -30
      utils/src/sourceFynnder.js
  59. +23
    -0
      views/index.hbs
  60. +43
    -0
      views/layouts/main.hbs

+ 4
- 3
.vscode/Snippets.code-snippets View File

@@ -29,13 +29,14 @@
"module: '$5',",
"cooldown: $6,",
"guildOnly: $7,",
"developerOnly: $8",
"developerOnly: $8,",
"nsfw: $9",
"});",
"}",
"\n",
"async command(ctx) {",
"$9",
"}",
"$10",
"}",
"}"]
}
}

+ 3
- 1
.vscode/settings.json View File

@@ -1,3 +1,5 @@
{
"editor.lineNumbers": "off"
"editor.lineNumbers": "on",
"editor.defaultFormatter": "remimarsal.prettier-now",
"editor.formatOnSave": true
}

+ 121
- 0
Dashboard/assets/css/main.css View File

@@ -0,0 +1,121 @@
@import url("https://fonts.googleapis.com/css?family=Montserrat&display=swap");
.center {
position: absolute;
top: 40%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}

body {
font-family: 'Montserrat', sans-serif;
background: #131313;
color: white;
}

ul {
list-style: none;
}

a {
text-decoration: none;
}

.title {
font-size: 6vh;
}

.subtitle {
font-size: 5vh;
padding: 1vh;
}

.Stats {
font-size: 3vh;
white-space: nowrap;
}

.rainbow {
text-align: center;
text-decoration: underline;
font-size: 32px;
font-family: monospace;
letter-spacing: 5px;
}

.rainbow_text_animated {
background: -webkit-gradient(linear, left top, right top, from(#6666ff), color-stop(#0099ff), color-stop(#00ff00), color-stop(#ff3399), to(#6666ff));
background: linear-gradient(to right, #6666ff, #0099ff, #00ff00, #ff3399, #6666ff);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
-webkit-animation: rainbow_animation 6s ease-in-out infinite;
animation: rainbow_animation 6s ease-in-out infinite;
background-size: 400% 100%;
}

@-webkit-keyframes rainbow_animation {
0%,
100% {
background-position: 0 0;
}
50% {
background-position: 100% 0;
}
}

@keyframes rainbow_animation {
0%,
100% {
background-position: 0 0;
}
50% {
background-position: 100% 0;
}
}

.source,
.invite,
.support {
font-family: 'Montserrat', sans-serif;
background-color: #ffffff;
/* Green */
border: none;
/* border-radius: 1vh; */
padding: 1vh;
margin: 1vh;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 2vh;
font-weight: bold;
text-transform: uppercase;
}

.source a,
.invite a,
.support a {
color: black;
}

.icon {
display: inline-block;
vertical-align: left;
width: auto;
height: 10vh;
border-radius: 50%;
}

::-webkit-scrollbar {
display: none;
}

divide {
display: block;
height: 1px;
border: 0;
border-top: 0px solid rgba(204, 204, 204, 0);
margin: 1em 0;
padding: 1em;
}
/*# sourceMappingURL=main.css.map */

+ 9
- 0
Dashboard/assets/css/main.css.map View File

@@ -0,0 +1,9 @@
{
"version": 3,
"mappings": "AAkCA,OAAO,CAAC,sEAAI;AACZ,AAAA,OAAO,CAAC;EAlCP,QAAQ,EAAE,QAAQ;EAGjB,GAAG,EAAE,GAAG;EACR,IAAI,EAAE,GAAG;EACT,SAAS,EAAE,qBAAqB;CA+BjC;;AACD,AAAA,IAAI,CAAC;EACJ,WAAW,EAAE,wBAAwB;EACrC,UAAU,EAAE,OAAO;EACnB,KAAK,EAAE,KAAK;CACZ;;AACD,AAAA,EAAE,CAAC;EACF,UAAU,EAAE,IAAI;CAChB;;AACD,AAAA,CAAC,CAAC;EACD,eAAe,EAAE,IAAI;CACrB;;AAED,AAAA,MAAM,CAAC;EACN,SAAS,EAAE,GAAG;CACd;;AAED,AAAA,SAAS,CAAC;EACT,SAAS,EAAE,GAAG;EACd,OAAO,EAAE,GAAG;CACZ;;AAED,AAAA,MAAM,CAAC;EACN,SAAS,EAAE,GAAG;EACd,WAAW,EAAE,MAAM;CACnB;;AAED,AAAA,QAAQ,CAAC;EACR,UAAU,EAAE,MAAM;EAClB,eAAe,EAAE,SAAS;EAC1B,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,SAAS;EACtB,cAAc,EAAE,GAAG;CACnB;;AACD,AAAA,sBAAsB,CAAC;EACtB,UAAU,EAAE,sEAAsE;EAClF,uBAAuB,EAAE,IAAI;EAC7B,eAAe,EAAE,IAAI;EACrB,KAAK,EAAE,WAAW;EAClB,SAAS,EAAE,yCAAyC;EACpD,eAAe,EAAE,SAAS;CAC1B;;AAED,UAAU,CAAV,iBAAU;EACT,EAAE;EACF,IAAI;IACH,mBAAmB,EAAE,GAAG;;EAGzB,GAAG;IACF,mBAAmB,EAAE,MAAM;;;;AAI7B,AAAA,OAAO;AACP,OAAO;AACP,QAAQ,CAAC;EA5ER,WAAW,EAAE,wBAAwB;EACrC,gBAAgB,EAAE,OAAO;EAAE,WAAW;EACtC,MAAM,EAAE,IAAI;EACZ,yBAAyB;EACzB,OAAO,EAAE,GAAG;EACZ,MAAM,EAAE,GAAG;EACX,UAAU,EAAE,MAAM;EAClB,eAAe,EAAE,IAAI;EACrB,OAAO,EAAE,YAAY;EACrB,SAAS,EAAE,GAAG;EACd,WAAW,EAAE,IAAI;EACjB,cAAc,EAAE,SAAS;CAmEzB;;AAJD,AA9DC,OA8DM,CA9DN,CAAC;AA+DF,OAAO,CA/DN,CAAC;AAgEF,QAAQ,CAhEP,CAAC,CAAC;EACD,KAAK,EAAE,KAAY;CACnB;;AAiEF,AAAA,KAAK,CAAC;EACL,OAAO,EAAE,YAAY;EACrB,cAAc,EAAE,IAAI;EACpB,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,aAAa,EAAE,GAAG;CAClB;;AAED,AAAA,mBAAmB,CAAC;EACnB,OAAO,EAAE,IAAI;CACb;;AAED,AAAA,MAAM,CAAC;EACN,OAAO,EAAE,KAAK;EACd,MAAM,EAAE,GAAG;EACX,MAAM,EAAE,CAAC;EACT,UAAU,EAAE,GAAG,CAAC,KAAK,CAAC,sBAAsB;EAC5C,MAAM,EAAE,KAAK;EACb,OAAO,EAAE,GAAG;CACZ",
"sources": [
"main.scss"
],
"names": [],
"file": "main.css"
}

+ 116
- 0
Dashboard/assets/css/main.scss View File

@@ -0,0 +1,116 @@
@mixin centerer($horizontal: true, $vertical: true) {
position: absolute;

@if ($horizontal and $vertical) {
top: 40%;
left: 50%;
transform: translate(-50%, -50%);
} @else if ($horizontal) {
left: 50%;
transform: translate(-50%, 0);
} @else if ($vertical) {
top: 50%;
transform: translate(0, -50%);
}
}

@mixin Buttons {
font-family: 'Montserrat', sans-serif;
background-color: #ffffff; /* Green */
border: none;
/* border-radius: 1vh; */
padding: 1vh;
margin: 1vh;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 2vh;
font-weight: bold;
text-transform: uppercase;
a {
color: rgb(0, 0, 0);
}
}

@import url('https://fonts.googleapis.com/css?family=Montserrat&display=swap');
.center {
@include centerer;
}
body {
font-family: 'Montserrat', sans-serif;
background: #131313;
color: white;
}
ul {
list-style: none;
}
a {
text-decoration: none;
}

.title {
font-size: 6vh;
}

.subtitle {
font-size: 5vh;
padding: 1vh;
}

.Stats {
font-size: 3vh;
white-space: nowrap;
}

.rainbow {
text-align: center;
text-decoration: underline;
font-size: 32px;
font-family: monospace;
letter-spacing: 5px;
}
.rainbow_text_animated {
background: linear-gradient(to right, #6666ff, #0099ff, #00ff00, #ff3399, #6666ff);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
animation: rainbow_animation 6s ease-in-out infinite;
background-size: 400% 100%;
}

@keyframes rainbow_animation {
0%,
100% {
background-position: 0 0;
}

50% {
background-position: 100% 0;
}
}

.source,
.invite,
.support {
@include Buttons();
}
.icon {
display: inline-block;
vertical-align: left;
width: auto;
height: 10vh;
border-radius: 50%;
}

::-webkit-scrollbar {
display: none;
}

divide {
display: block;
height: 1px;
border: 0;
border-top: 0px solid rgba(204, 204, 204, 0);
margin: 1em 0;
padding: 1em;
}

BIN
Dashboard/assets/images/icon.png View File

Before After
Width: 1500  |  Height: 1500  |  Size: 979 KiB

+ 97
- 0
Dashboard/server.js View File

@@ -0,0 +1,97 @@
const express = require('express');
const { hostname, port, authorization, source, invite, type } = require('../config');
const db = require('quick.db');
const Backend = new db.table('backend');
const chalk = require('chalk');
const helmet = require('helmet');
const compression = require('compression');
const cors = require('cors');
const morgan = require('morgan');
var hbs = require('express-handlebars');

const app = express();

app.set('view engine', 'hbs');
app.engine(
'hbs',
hbs({
extname: 'hbs',
defaultView: 'default'
})
);
app.set('json spaces', 4);
app.use('/assets', express.static(__dirname + '/assets'));
app.set('view options', {
layout: false
});

app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.use(helmet());
app.use(compression());
app.use(cors());
// Logging
app.use(
morgan((tokens, req, res) => {
return [
chalk.hex('#34ace0').bold(tokens.method(req, res)),
chalk.hex('#ffb142').bold(tokens.status(req, res)),
chalk.hex('#ff5252').bold(req.hostname + tokens.url(req, res)),
chalk.hex('#2ed573').bold(tokens['response-time'](req, res) + 'ms'),
chalk.hex('#f78fb3').bold('@ ' + tokens.date(req, res))
].join(' ');
})
);
let support = 'https://discord.gg/' + Backend.get('Info.invite');
module.exports = (client) => {
app.get('/', async (req, res) => {
res.status(200).render('index', {
layout: 'main',
title: 'Thaldrin',
subtitle: 'A Random Image and Utility Bot',
bot: {
users: client.users.size,
guilds: client.guilds.size,
channels: client.channels.size,
commands: client.commands.size,
invite: `https://${req.hostname}${type.beta ? ':8080' : ''}/invite`,
source: `https://${req.hostname}${type.beta ? ':8080' : ''}/source`,
support: `https://${req.hostname}${type.beta ? ':8080' : ''}/discord`
}
});
});

app.get('/discord', async (req, res) => {
res.redirect(support);
});
app.get('/source', async (req, res) => {
res.redirect(source);
});
app.get('/invite', async (req, res) => {
res.redirect(invite);
});
/* app.get('/this', async (req, res) => {
res.json(client);
}); */

/* app.post('/vote', async (req, res) => {
const body = req.body;
const auth = req.header('Authorization');
if (auth != authorization) return res.status(403), console.warn(`Vote rejected with authorization '${auth}'`);
// if (body.bot != client.user.id) return res.status(403), console.warn(`Vote rejected with ID '${body.bot}'`);

if (body.type == 'test') {
console.log(`Test succeeded, is weekend:`, body.isWeekend);
} else {
console.log(`Vote`)
client.vote(body.user);
}
}); */

app.listen(port, hostname, () => {
setTimeout(() => {
console.log(`Listening on ${hostname}:${port}`);
}, 1000 * 3);
});
};

+ 75
- 84
DiscordEvents/message.js View File

@@ -1,92 +1,83 @@
const { Collection } = require("discord.js");
const { ShortLinks, SourceFynnder } = require("../utils");
let ShortLinksEnabled = true;
let SourceFynnderEnabled = true;
const { table } = require("quick.db");
const Servers = new table("servers");
const Users = new table("users");
const Backend = new table("backend");
const { Collection } = require('discord.js');
const { table } = require('quick.db');
const Servers = new table('servers');
const Users = new table('users');
const Backend = new table('backend');
module.exports = {
name: "message",
run: async (client, msg) => {
const prefix = client.config.prefixes.find(p =>
msg.content.toLowerCase().startsWith(p)
);
name: 'message',
run: async (client, msg) => {
//if (msg.author.id !== '318044130796109825') return;
if (msg.author.bot) return;
const DefaultPrefix = client.config.prefixes;
const CustomPrefix = Servers.get(msg.guild.id);
if (!CustomPrefix) {
PrefixArray = [ DefaultPrefix /* , CustomPrefix */ ].flat(Infinity);
} else {
PrefixArray = [ DefaultPrefix, CustomPrefix.prefix ].flat(Infinity);
}
let PREFIX;
let EXISTS;
for (p in PrefixArray) {
if (msg.content.startsWith(PrefixArray[p])) {
EXISTS = true;
PREFIX = p;
}
}
if (!EXISTS) return;
const args = msg.content.slice(PrefixArray[PREFIX].length).trim().split(/ +/g);
const command = args.shift().toLowerCase();
const cmd = client.commands.find((c) => c.name == command || (c.aliases && c.aliases.includes(command)));

if (msg.author.bot) return;
if (msg.author.id !== "318044130796109825") return;
let Server = Servers.get(msg.guild.id);
let enabled;
if (Server === null) {
enabled = require("../utils").db.defaults.server;
} else {
enabled = Server;
}
const ctx = {
send: msg.channel.send.bind(msg.channel),
client,
msg,
args,
command: cmd,
me: msg.guild.me,
guild: msg.guild,
channel: msg.channel,
author: msg.author,
member: msg.member,
db: { users: Users, servers: Servers, backend: Backend },
utils: require('../utils'),
config: require('../config'),
isDeveloper: client.config.developers.find((dev) => msg.author.id == dev.id)
};
if (!cmd) return;

ShortLinks(enabled.Shortlinks, msg);
if (!prefix) return;
const args = msg.content.slice(prefix.length).split(/ +/g);
const command = args.shift().toLowerCase();
const cmd = client.commands.find(
c => c.name == command || (c.aliases && c.aliases.includes(command))
);
if (!client.cooldowns.has(cmd.name)) {
client.cooldowns.set(cmd.name, new Collection());
}

const ctx = {
send: msg.channel.send.bind(msg.channel),
client,
msg,
args,
command: cmd,
me: msg.guild.me,
guild: msg.guild,
channel: msg.channel,
author: msg.author,
member: msg.member,
db: { users: Users, servers: Servers, backend: Backend },
utils: require("../utils"),
isDeveloper: client.config.developers.find(id => msg.author.id == id)
};
if (!cmd) return;
if (cmd.guildOnly && !msg.guild) return;
if (cmd.nsfw && !ctx.channel.nsfw)
return ctx.send('This channel is not marked as NSFW, please mark it as such and rerun this command.');
if (cmd.developerOnly && !client.config.developers.find((dev) => msg.author.id == dev.id)) return;
if (cmd.AuthorPermissions !== 'NONE' && !ctx.member.permissions.has(cmd.AuthorPermissions))
return ctx.send(`You need \`${cmd.AuthorPermissions}\` Permission(s) to run this Command`);
const now = Date.now();
const timestamps = client.cooldowns.get(cmd.name);
const cooldownAmount = (cmd.cooldown || 1) * 1000;

if (!client.cooldowns.has(cmd.name)) {
client.cooldowns.set(cmd.name, new Collection());
}
if (timestamps.has(msg.author.id)) {
const expirationTime = timestamps.get(msg.author.id) + cooldownAmount;

if (cmd.guildOnly && !msg.guild) return;
if (
cmd.developerOnly &&
!client.config.developers.find(devs => msg.author.id == devs.id)
)
return;
if (now < expirationTime) {
const timeLeft = (expirationTime - now) / 1000;
return ctx.send(
`\`${cmd.name}\` has a cooldown of \`${cmd.cooldown} second${cmd.cooldown > 1
? 's'
: ''}\`, wait \`${`${Math.round(timeLeft)} second${Math.round(timeLeft) > 1
? 's'
: ''}`.replace('0 second', 'just a second longer')}\` before trying to use it again.`
);
}
} else {
timestamps.set(msg.author.id, now);
setTimeout(() => timestamps.delete(msg.author.id), cooldownAmount);

const now = Date.now();
const timestamps = client.cooldowns.get(cmd.name);
const cooldownAmount = (cmd.cooldown || 1) * 1000;

if (timestamps.has(msg.author.id)) {
const expirationTime = timestamps.get(msg.author.id) + cooldownAmount;

if (now < expirationTime) {
const timeLeft = (expirationTime - now) / 1000;
return ctx.send(
`\`${cmd.name}\` has a cooldown of \`${cmd.cooldown} second${
cmd.cooldown > 1 ? "s" : ""
}\`, wait \`${`${Math.round(timeLeft)} second${
Math.round(timeLeft) > 1 ? "s" : ""
}`.replace(
"0 second",
"just a second longer"
)}\` before trying to use it again.`
);
}
} else {
timestamps.set(msg.author.id, now);
setTimeout(() => timestamps.delete(msg.author.id), cooldownAmount);

cmd
.command(ctx)
.then(() => {})
.catch(console.error);
}
}
cmd.command(ctx).then(() => {}).catch(console.error);
}
}
};

+ 35
- 32
DiscordEvents/messageReactionAdd.js View File

@@ -1,36 +1,39 @@
const p = require('phin').defaults({
method: 'POST',
parse: 'json'
method: 'POST',
parse: 'json'
});
const hastebin = require('hastebin-gen');
module.exports = {
name: 'messageReactionAdd',
run: async (client, reaction, user) => {
if (user.bot) return;
if (!client.config.developers.find(id => id == user.id)) return;
name: 'messageReactionAdd',
run: async (client, reaction, user) => {
if (user.bot) return;
if (user.id !== '318044130796109825') return;
if (reaction.emoji.name == '๐Ÿ“ฅ') {
let haste;
try {
if (!client.lastEval) {
await reaction.message.edit(`\`Unable to upload uncached eval results\``);
await reaction.message.reactions.removeAll();
} else {
hastebin(`${client.lastEval || `Last eval resuts weren't cached`}`, { extension: 'js' })
.then(async (h) => {
await reaction.message.edit(`<${h}>`);
await reaction.message.reactions.removeAll();
})
.catch((error) => {
// Handle error
console.error(error);
});
}
} catch (err) {
console.error(err);
}
}

if (reaction.emoji.name == '๐Ÿ“ฅ') {
try {
if (!client.cache.lastEval) {
await reaction.message.edit(`\`Unable to upload uncached eval results\``);
await reaction.message.reactions.removeAll();
} else {
const { body } = await p({
url: `https://hasteb.in/documents`,
data: `${client.cache.lastEval || `Last eval resuts weren't cached`}`
});
await reaction.message.edit(`<https://hasteb.in/${body.key}>`);
await reaction.message.reactions.removeAll();
}
} catch(err) {}
}
if (reaction.emoji.name == '๐Ÿ—‘') {
try {
await reaction.message.delete();
} catch(err) {}
}
}
}
if (reaction.emoji.name == '๐Ÿ—‘') {
try {
await reaction.message.delete();
} catch (err) {}
}
}
};

+ 6
- 6
DiscordEvents/ready.js View File

@@ -1,9 +1,9 @@
const { log } = require("../utils/index");
const { log } = require('../utils/index');

module.exports = {
name: "ready",
run: async client => {
log.hasStarted();
client.user.setActivity(`@${client.user.username} help to get started`);
}
name: 'ready',
run: async (client) => {
log.hasStarted();
client.user.setActivity(`nyeh`, { type: 2 });
}
};

+ 65
- 75
DiscordModules/Developers/eval.js View File

@@ -1,90 +1,80 @@
const Command = require("../../src/structures/Command");
const { table } = require("quick.db");
const Servers = new table("servers");
const Users = new table("users");
const Command = require('../../src/structures/Command');
const { table } = require('quick.db');
const Servers = new table('servers');
const Users = new table('users');
const Bot = new table('bot');

const clean = text => {
if (typeof text == "string")
return text
.replace(/`/g, "`" + String.fromCharCode(8203))
.replace(/@/g, "@" + String.fromCharCode(8203));
else return text;
const clean = (text) => {
if (typeof text == 'string')
return text.replace(/`/g, '`' + String.fromCharCode(8203)).replace(/@/g, '@' + String.fromCharCode(8203));
else return text;
};

module.exports = class Eval extends Command {
constructor() {
super({
name: "eval",
description: "Run JavaScript code directly from the process.",
aliases: ["ev", "e"],
module: "Developers",
cooldown: 0,
guildOnly: false,
developerOnly: true
});
}
constructor() {
super({
name: 'eval',
description: 'Run JavaScript code directly from the process.',
aliases: [ 'ev', 'e' ],
module: 'Developers',
cooldown: 0,
guildOnly: false,
developerOnly: true
});
}

async command(ctx) {
if (!ctx.args.length) return;
async command(ctx) {
if (!ctx.args.length) return;

const client = ctx.client;
const client = ctx.client;

let code = ctx.args.join(" ");
let silent = false;
let code = ctx.args.join(' ');
let silent = false;

if (code.endsWith("-s")) (code = code.split("-s")[0]), (silent = true);
if (code.endsWith("--silent"))
(code = code.split("--silent")[0]), (silent = true);
if (code.endsWith('-s')) (code = code.split('-s')[0]), (silent = true);
if (code.endsWith('--silent')) (code = code.split('--silent')[0]), (silent = true);

try {
let evaled = await eval(code);
try {
let evaled = await eval(code);

if (typeof evaled != "string") evaled = require("util").inspect(evaled);
if (typeof evaled != 'string')
evaled = require('util').inspect(evaled, false, await ctx.db.backend.get('eval'));

evaled.replace(
new RegExp(client.token.replace(/\./g, "\\.", "g")),
"uwu"
);
evaled.replace(new RegExp(client.token.replace(/\./g, '\\.', 'g')), 'uwu');

if (!silent) {
ctx
.send(`\`\`\`js\n${clean(evaled)}\n\`\`\``)
.then(async m => {
await m.react("๐Ÿ“ฅ");
await m.react("๐Ÿ—‘");
})
.catch(err => {
ctx
.send(
`\`Content is over 2,000 characters: react to upload to Hastebin\``
)
.then(async m => {
client.lastEval = clean(evaled);
if (!silent) {
ctx
.send(`\`\`\`js\n${clean(evaled)}\n\`\`\``)
.then(async (m) => {
await m.react('๐Ÿ“ฅ');
await m.react('๐Ÿ—‘');
})
.catch((err) => {
ctx
.send(`\`Content is over 2,000 characters: react to upload to Hastebin\``)
.then(async (m) => {
client.lastEval = clean(evaled);

await m.react("๐Ÿ“ฅ");
await m.react("๐Ÿ—‘");
});
});
}
} catch (error) {
ctx
.send(`\`\`\`js\n${clean(error)}\n\`\`\``)
.then(async m => {
await m.react("๐Ÿ“ฅ");
await m.react("๐Ÿ—‘");
})
.catch(err => {
ctx
.send(
`\`Content is over 2,000 characters: react to upload to Hastebin\``
)
.then(async m => {
client.lastEval = clean(error);
await m.react('๐Ÿ“ฅ');
await m.react('๐Ÿ—‘');
});
});
}
} catch (error) {
ctx
.send(`\`\`\`js\n${clean(error)}\n\`\`\``)
.then(async (m) => {
await m.react('๐Ÿ“ฅ');
await m.react('๐Ÿ—‘');
})
.catch((err) => {
ctx.send(`\`Content is over 2,000 characters: react to upload to Hastebin\``).then(async (m) => {
client.lastEval = clean(error);

await m.react("๐Ÿ“ฅ");
await m.react("๐Ÿ—‘");
});
});
}
}
await m.react('๐Ÿ“ฅ');
await m.react('๐Ÿ—‘');
});
});
}
}
};

+ 29
- 30
DiscordModules/Developers/reload.js View File

@@ -1,39 +1,38 @@
const Command = require('../../src/structures/Command');

module.exports = class Reload extends Command {
constructor() {
super({
name: 'reload',
description: 'Reload a command without restarting the process.',
aliases: ['re'],
module: 'Developers',
cooldown: 0,
guildOnly: false,
developerOnly: true
});
}
constructor() {
super({
name: 'reload',
description: 'Reload a command without restarting the process.',
aliases: [ 're' ],
module: 'Developers',
cooldown: 0,
guildOnly: false,
developerOnly: true
});
}

async command(ctx) {
if (!ctx.args.length) return;
const date = Date.now();
async command(ctx) {
if (!ctx.args.length) return;
const date = Date.now();

const data = ctx.args[0];
const [module,command] = data.split('/');
const data = ctx.args[0];
const [ module, command ] = data.split('/');

if (!module || !command) return;
if (!module || !command) return;

try {
delete require.cache[require.resolve(`../${module}/${command}`)];
delete ctx.client.commands.get(command);
try {
delete require.cache[require.resolve(`../${module}/${command}`)];
delete ctx.client.commands.get(command);

const cmd = require(`../${module}/${command}`);
const Command = new cmd();
ctx.client.commands.set(Command.name, Command);
const cmd = require(`../${module}/${command}`);
const Command = new cmd();
ctx.client.commands.set(Command.name, Command);

console.log(`Reloaded \`${Command.name}\` in ${(Date.now() - date) / 1000}s.`)
return ctx.send(`Reloaded \`${Command.name}\` in ${(Date.now() - date) / 1000}s.`);
} catch(err) {
return ctx.send(`Failed to reload the command.\n\`${err}\``);
}
}
}
return ctx.send(`Reloaded \`${Command.name}\` in ${(Date.now() - date) / 1000}s.`);
} catch (err) {
return ctx.send(`Failed to reload the command.\n\`${err}\``);
}
}
};

+ 0
- 21
DiscordModules/Developers/setup.js View File

@@ -1,21 +0,0 @@
const Command = require("../../src/structures/Command");
module.exports = class Setup extends Command {
constructor() {
super({
name: "setup",
description: "x",
aliases: ["s"],
module: "Developers",
cooldown: 0,
guildOnly: false,
developerOnly: true
});
}

async command(ctx) {
let x = await ctx.utils.db.prefix
.remove(ctx)
.catch(err => console.error(err));
//' console.log(x);
}
};

+ 16
- 15
DiscordModules/Developers/stop.js View File

@@ -1,18 +1,19 @@
const Command = require("../../src/structures/Command");
const Command = require('../../src/structures/Command');
module.exports = class Stop extends Command {
constructor() {
super({
name: "stop",
description: "Stops the bot",
aliases: [],
module: "Developers",
cooldown: 0,
guildOnly: false,
developerOnly: true
});
}
constructor() {
super({
name: 'stop',
description: 'Stops the bot',
aliases: [],
module: 'Developers',
cooldown: 0,
guildOnly: false,
developerOnly: true
});
}

async command(ctx) {
process.exit();
}
async command(ctx) {
await ctx.send('Restarting.');
process.exit();
}
};

+ 116
- 94
DiscordModules/General/help.js View File

@@ -1,104 +1,126 @@
const Command = require("../../src/structures/Command");
const { MessageEmbed } = require("discord.js");
const Command = require('../../src/structures/Command');
const { MessageEmbed } = require('discord.js');

module.exports = class Help extends Command {
constructor() {
super({
name: "help",
description:
"View a list of available commands, or view information on a specific command.",
aliases: ["h"],
module: "General",
cooldown: 0,
guildOnly: false,
developerOnly: false
});
}
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) {
if (!ctx.args.length) {
const commands = [
[
"General",
ctx.client.commands
.filter(command => command.module == "General")
.map(command => `**${command.name}** - ${command.description}`)
.join("\n")
]
];
async command(ctx) {
if (!ctx.args.length) {
const commands = [
[
'General',
ctx.client.commands
.filter((command) => command.module == 'General')
.map((command) => `${command.name}`)
.join(' | ')
],
/* [
'Images',
ctx.client.commands
.filter((command) => command.module == 'Images')
.map((command) => `${command.name}`)
.join(' | ')
], */
[
'Images',
ctx.client.commands
.filter((command) => command.module == 'Images')
.map((command) => `${command.name}`)
.join(' | ')
],
[
'Roleplay',
ctx.client.commands
.filter((command) => command.module == 'Roleplay')
.map((command) => `${command.name}`)
.join(' | ')
],
[
'Settings',
ctx.client.commands
.filter((command) => command.module == 'Settings')
.map((command) => `${command.name}`)
.join(' | ')
]
];

if (ctx.isDeveloper)
commands.push([
"Developers",
ctx.client.commands
.filter(command => command.module == "Developers")
.map(command => command.name)
.join(", ")
]);
if (ctx.isDeveloper)
commands.push([
'Developers',
ctx.client.commands
.filter((command) => command.module == 'Developers')
.map((command) => `${command.name}`)
.join(' | ')
]);

return ctx.send({
embed: {
fields: commands.map(group => {
return new Object({
name: group[0],
value: group[1]
});
}),
color: 0xff873f
}
});
} else {
const command = ctx.client.commands.find(
c =>
c.name == ctx.args[0].toLowerCase() ||
(c.aliases && c.aliases.includes(ctx.args[0].toLowerCase()))
);
return ctx.send({
embed: {
description: `Use \`'help command\` to get help on a specific command`,
fields: commands.map((group) => {
return new Object({
name: group[0],
value: group[1]
});
}),
color: 0xff873f
}
});
} else {
const command = ctx.client.commands.find(
(c) =>
c.name == ctx.args[0].toLowerCase() || (c.aliases && c.aliases.includes(ctx.args[0].toLowerCase()))
);

let fields = [
{
name: "Module",
value: command.module,
inline: true
},
{
name: "Aliases",
value:
command.aliases.length == 0
? "No aliases"
: command.aliases.join(", "),
inline: true
},
{
name: "Cooldown",
value: command.cooldown == 0 ? "No cooldown" : `${command.cooldown}s`,
inline: true
},
{
name: "Server only?",
value: command.guildOnly ? "Yes" : "No",
inline: true
},
{
name: "Developers only?",
value: command.developerOnly ? "Yes" : "No",
inline: true
}
];
let fields = [
{
name: 'Module',
value: command.module,
inline: true
},
{
name: 'Aliases',
value: command.aliases.length == 0 ? 'No aliases' : command.aliases.join(', '),
inline: true
},
{
name: 'Cooldown',
value: command.cooldown == 0 ? 'No cooldown' : `${command.cooldown}s`,
inline: true
},
{
name: 'Server only?',
value: command.guildOnly ? 'Yes' : 'No',
inline: true
},
{
name: 'Developers only?',
value: command.developerOnly ? 'Yes' : 'No',
inline: true
}
];

if (!command)
return ctx.send(
`That command couldn't be found. See the \`help\` command for valid commands.`
);
if (!command)
return ctx.send(`That command couldn't be found. See the \`help\` command for valid commands.`);

let embed = new MessageEmbed()
.setTitle(command.name)
.setDescription(command.description)
.setColor(0xff873f);
fields.forEach(i => {
embed.addField(i.name, i.value, i.inline);
});
let embed = new MessageEmbed()
.setTitle(command.name)
.setDescription(command.description)
.setColor(0xff873f);
fields.forEach((i) => {
embed.addField(i.name, i.value, i.inline);
});

return ctx.send(embed);
}
}
return ctx.send(embed);
}
}
};

+ 49
- 38
DiscordModules/General/info.js View File

@@ -1,42 +1,53 @@
const Command = require("../../src/structures/Command");
const { MessageEmbed } = require("discord.js");
const { developers, contributors, source } = require("../../config");
const { version: DiscordVersion } = require("discord.js");
const Command = require('../../src/structures/Command');
const { MessageEmbed, version: DiscordVersion } = require('discord.js');
const { developers, contributors, source, color } = require('../../config');
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
});
}
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 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(`Thaldrin, a Random Image and Utility Bot`)
.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("Contributors", Contributors)
.addField("Source", `[gitdab.com/r/thaldrin](${source})`);
async command(ctx) {
let result;
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);
}
ctx.send(CreditEmbed);
}
};

+ 70
- 0
DiscordModules/General/serverinfo.js View File

@@ -0,0 +1,70 @@
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(' **|** '));
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);
}
};

+ 50
- 0
DiscordModules/General/system.js View File

@@ -0,0 +1,50 @@
const Command = require('../../src/structures/Command');
const { MessageEmbed, version: DiscordVersion } = require('discord.js');
const os = require('os');
const { developers, contributors, source, color } = require('../../config');
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.config.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);
}
};

+ 59
- 0
DiscordModules/General/userinfo.js View File

@@ -0,0 +1,59 @@
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}`)
.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 + '```'));
}
};

+ 41
- 0
DiscordModules/Images/birb.js View File

@@ -0,0 +1,41 @@
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);
}
};

+ 41
- 0
DiscordModules/Images/cat.js View File

@@ -0,0 +1,41 @@
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);
}
};

+ 43
- 55
DiscordModules/Images/e621.js View File

@@ -1,58 +1,46 @@
const Command = require("../../src/structures/Command");
const yiff = require("yiff");
const { MessageEmbed } = require("discord.js");
let Icon =
"https://cdn6.aptoide.com/imgs/0/7/f/07f23fe390d6d20f47839932ea23c678_icon.png?w=240";
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
});
}

async command(ctx) {
let Embed = new MessageEmbed().setColor("RED");
if (!ctx.channel.nsfw) {
Embed.setTitle("NSFW").setDescription(
`This channel is not marked as NSFW, please mark it as such and rerun this command.`
);
return ctx.send(Embed);
}
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 message = await ctx.send(`Searching...`);

let req;
let Message;
await yiff.e621.CubFilter(ctx.args.join(" ")).then(E => (req = E));
if (Settings.embeds) {
Message = new MessageEmbed().setImage(req.image);

message.delete();
} else {
Message = `${req.image}`;
message.delete();
}
ctx.send(Message);
}
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);
}
};

+ 46
- 0
DiscordModules/Images/e926.js View File

@@ -0,0 +1,46 @@
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);
}
};

+ 41
- 0
DiscordModules/Images/fox.js View File

@@ -0,0 +1,41 @@
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);
}
};

+ 42
- 0
DiscordModules/Images/shibe.js View File

@@ -0,0 +1,42 @@
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));
console.log(req);
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);
}
};

+ 41
- 0
DiscordModules/Images/wolf.js View File

@@ -0,0 +1,41 @@
const Command = require('../../src/structures/Command');
const yiff = require('yiff');
const { MessageEmbed } = require('discord.js');

module.exports = class Wolf extends Command {
constructor() {
super({
name: 'wolf',
description: 'Get a random wolf',
aliases: [ 'woof', 'wolves', 'awoo' ],
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.wolf().then((E) => (req = E));
if (Settings.embeds) {
Message = new MessageEmbed()
.setImage(req.url)
.setColor(ctx.config.color)
.setFooter(`${ctx.client.user.username} - Provided by sheri.bot`, ctx.client.user.avatarURL());
} else {
Message = `${req}`;
}
ctx.send(Message);
}
};

+ 65
- 0
DiscordModules/Roleplay/bang.js View File

@@ -0,0 +1,65 @@
const Command = require('../../src/structures/Command');
const yiff = require('yiff');
const { MessageEmbed } = require('discord.js');

module.exports = class Bang extends Command {
constructor() {
super({
name: 'bang',
description: 'Cuddle a user',
aliases: [ 'fuck' ],
module: 'Roleplay',
cooldown: 2,
guildOnly: true,
developerOnly: false,
nsfw: true
});
}

async command(ctx) {
if (ctx.msg.mentions.members.size === 0) return ctx.send('please mention a user ;w;');
if (ctx.msg.mentions.members.first().id === ctx.client.user.id)
return ctx.send("Don't bang me! Bang someone else!");
if (ctx.msg.mentions.members.first().id === ctx.author.id)
return ctx.send(`Don't you want to bang someone other than yourself?`);

const Server = await ctx.db.servers.get(ctx.guild.id);
let Line;
if (Server.rp_text) {
const LineFromUtils = ctx.utils.int.bang[parseInt(Math.random() * ctx.utils.int.bang.length)];
Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace(
/1/g,
ctx.utils.format.bold(ctx.msg.mentions.members.first().user.username)
);
} else {
Line = undefined;
}

let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
let req;
let Message;
await yiff.furrybot.nsfw.bang().then((E) => (req = E));

if (Settings.embeds) {
Message = new MessageEmbed()
.setColor(ctx.config.color)
.setImage(req)
.setFooter(`${ctx.client.user.username} - Provided by furry.bot`, ctx.client.user.avatarURL());
if (Line) {
Message.setDescription(Line);
}
} else {
if (Line) {
Message = `${Line}\n${req}`;
} else {
Message = `${req}`;
}
}
ctx.send(Message);
}
};

+ 65
- 0
DiscordModules/Roleplay/boop.js View File

@@ -0,0 +1,65 @@
const Command = require('../../src/structures/Command');
const yiff = require('yiff');
const { MessageEmbed } = require('discord.js');

module.exports = class Boop extends Command {
constructor() {
super({
name: 'boop',
description: 'Boop a user',
aliases: [],
module: 'Roleplay',
cooldown: 2,
guildOnly: true,
developerOnly: false,
nsfw: false
});
}

async command(ctx) {
if (ctx.msg.mentions.members.size === 0) return ctx.send('please mention a user ;w;');
if (ctx.msg.mentions.members.first().id === ctx.client.user.id)
return ctx.send("Don't boop me! boop someone else!");
if (ctx.msg.mentions.members.first().id === ctx.author.id)
return ctx.send(`Don't you want to boop someone other than yourself?`);

const Server = await ctx.db.servers.get(ctx.guild.id);
let Line;
if (Server.rp_text) {
const LineFromUtils = ctx.utils.int.boop[parseInt(Math.random() * ctx.utils.int.boop.length)];
Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace(
/1/g,
ctx.utils.format.bold(ctx.msg.mentions.members.first().user.username)
);
} else {
Line = undefined;
}

let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
let req;
let Message;
await yiff.furrybot.sfw.boop().then((E) => (req = E));

if (Settings.embeds) {
Message = new MessageEmbed()
.setColor(ctx.config.color)
.setImage(req)
.setFooter(`${ctx.client.user.username} - Provided by furry.bot`, ctx.client.user.avatarURL());
if (Line) {
Message.setDescription(Line);
}
} else {
if (Line) {
Message = `${Line}\n${req}`;
} else {
Message = `${req}`;
}
}
ctx.send(Message);
}
};

+ 59
- 0
DiscordModules/Roleplay/bulge.js View File

@@ -0,0 +1,59 @@
const Command = require('../../src/structures/Command');
const yiff = require('yiff');
const { MessageEmbed } = require('discord.js');

module.exports = class Bulge extends Command {
constructor() {
super({
name: 'bulge',
description: `Look at a User's Bulge`,
aliases: [],
module: 'Roleplay',
cooldown: 2,
guildOnly: false,
developerOnly: false,
nsfw: true
});
}

async command(ctx) {
let Line;
const Server = await ctx.db.servers.get(ctx.guild.id);
if (ctx.msg.mentions.members.size > 0 && Server.rp_text) {
const LineFromUtils = ctx.utils.int.bulge[parseInt(Math.random() * ctx.utils.int.bulge.length)];
Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace(
/1/g,
ctx.utils.format.bold(ctx.msg.mentions.members.first().user.username)
);
} else {
Line = undefined;
}

let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
let req;
let Message;
await yiff.furrybot.nsfw.bulge().then((E) => (req = E));

if (Settings.embeds) {
Message = new MessageEmbed()
.setColor(ctx.config.color)
.setImage(req)
.setFooter(`${ctx.client.user.username} - Provided by furry.bot`, ctx.client.user.avatarURL());
if (Line) {
Message.setDescription(Line);
}
} else {
if (Line) {
Message = `${Line}\n${req}`;
} else {
Message = `${req}`;
}
}
ctx.send(Message);
}
};

+ 66
- 0
DiscordModules/Roleplay/cuddle.js View File

@@ -0,0 +1,66 @@
const Command = require('../../src/structures/Command');
const yiff = require('yiff');
const { MessageEmbed } = require('discord.js');

module.exports = class Cuddle extends Command {
constructor() {
super({
name: 'cuddle',
description: 'Cuddle a user',
aliases: [ 'snug', 'snuggle' ],
module: 'Roleplay',
cooldown: 2,
guildOnly: true,
developerOnly: false,
nsfw: false
});
}

async command(ctx) {
if (ctx.msg.mentions.members.size === 0) return ctx.send('please mention a user ;w;');
if (ctx.msg.mentions.members.first().id === ctx.client.user.id)
return ctx.send("Don't cuddle me! Cuddle someone else!");
if (ctx.msg.mentions.members.first().id === ctx.author.id)
return ctx.send(`Don't you want to cuddle someone other than yourself?`);

const Server = await ctx.db.servers.get(ctx.guild.id);
let Line;
if (Server.rp_text) {
const LineFromUtils = ctx.utils.int.cuddle[parseInt(Math.random() * ctx.utils.int.cuddle.length)];
console.log(LineFromUtils);
Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace(
/1/g,
ctx.utils.format.bold(ctx.msg.mentions.members.first().user.username)
);
} else {
Line = undefined;
}

let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
let req;
let Message;
await yiff.furrybot.sfw.cuddle().then((E) => (req = E));

if (Settings.embeds) {
Message = new MessageEmbed()
.setColor(ctx.config.color)
.setImage(req)
.setFooter(`${ctx.client.user.username} - Provided by furry.bot`, ctx.client.user.avatarURL());
if (Line) {
Message.setDescription(Line);
}
} else {
if (Line) {
Message = `${Line}\n${req}`;
} else {
Message = `${req}`;
}
}
ctx.send(Message);
}
};

+ 65
- 0
DiscordModules/Roleplay/hold.js View File

@@ -0,0 +1,65 @@
const Command = require('../../src/structures/Command');
const yiff = require('yiff');