lots of changes
This commit is contained in:
parent
304d0ccb96
commit
f7fd3b99a4
60 changed files with 3029 additions and 878 deletions
.vscode
Dashboard
DiscordEvents
DiscordModules
Developers
General
Images
Roleplay
Settings
server
src
utils
views
7
.vscode/Snippets.code-snippets
vendored
7
.vscode/Snippets.code-snippets
vendored
|
@ -29,13 +29,14 @@
|
||||||
"module: '$5',",
|
"module: '$5',",
|
||||||
"cooldown: $6,",
|
"cooldown: $6,",
|
||||||
"guildOnly: $7,",
|
"guildOnly: $7,",
|
||||||
"developerOnly: $8",
|
"developerOnly: $8,",
|
||||||
|
"nsfw: $9",
|
||||||
"});",
|
"});",
|
||||||
"}",
|
"}",
|
||||||
"\n",
|
"\n",
|
||||||
"async command(ctx) {",
|
"async command(ctx) {",
|
||||||
"$9",
|
"$10",
|
||||||
"}",
|
"}",
|
||||||
"}"]
|
"}"]
|
||||||
}
|
}
|
||||||
}
|
}
|
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
|
@ -1,3 +1,5 @@
|
||||||
{
|
{
|
||||||
"editor.lineNumbers": "off"
|
"editor.lineNumbers": "on",
|
||||||
|
"editor.defaultFormatter": "remimarsal.prettier-now",
|
||||||
|
"editor.formatOnSave": true
|
||||||
}
|
}
|
121
Dashboard/assets/css/main.css
Normal file
121
Dashboard/assets/css/main.css
Normal 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
Dashboard/assets/css/main.css.map
Normal file
9
Dashboard/assets/css/main.css.map
Normal 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
Dashboard/assets/css/main.scss
Normal file
116
Dashboard/assets/css/main.scss
Normal 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
Normal file
BIN
Dashboard/assets/images/icon.png
Normal file
Binary file not shown.
After (image error) Size: 979 KiB |
97
Dashboard/server.js
Executable file
97
Dashboard/server.js
Executable 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);
|
||||||
|
});
|
||||||
|
};
|
|
@ -1,92 +1,83 @@
|
||||||
const { Collection } = require("discord.js");
|
const { Collection } = require('discord.js');
|
||||||
const { ShortLinks, SourceFynnder } = require("../utils");
|
const { table } = require('quick.db');
|
||||||
let ShortLinksEnabled = true;
|
const Servers = new table('servers');
|
||||||
let SourceFynnderEnabled = true;
|
const Users = new table('users');
|
||||||
const { table } = require("quick.db");
|
const Backend = new table('backend');
|
||||||
const Servers = new table("servers");
|
|
||||||
const Users = new table("users");
|
|
||||||
const Backend = new table("backend");
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "message",
|
name: 'message',
|
||||||
run: async (client, msg) => {
|
run: async (client, msg) => {
|
||||||
const prefix = client.config.prefixes.find(p =>
|
//if (msg.author.id !== '318044130796109825') return;
|
||||||
msg.content.toLowerCase().startsWith(p)
|
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;
|
const ctx = {
|
||||||
if (msg.author.id !== "318044130796109825") return;
|
send: msg.channel.send.bind(msg.channel),
|
||||||
let Server = Servers.get(msg.guild.id);
|
client,
|
||||||
let enabled;
|
msg,
|
||||||
if (Server === null) {
|
args,
|
||||||
enabled = require("../utils").db.defaults.server;
|
command: cmd,
|
||||||
} else {
|
me: msg.guild.me,
|
||||||
enabled = Server;
|
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 (!client.cooldowns.has(cmd.name)) {
|
||||||
if (!prefix) return;
|
client.cooldowns.set(cmd.name, new Collection());
|
||||||
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))
|
|
||||||
);
|
|
||||||
|
|
||||||
const ctx = {
|
if (cmd.guildOnly && !msg.guild) return;
|
||||||
send: msg.channel.send.bind(msg.channel),
|
if (cmd.nsfw && !ctx.channel.nsfw)
|
||||||
client,
|
return ctx.send('This channel is not marked as NSFW, please mark it as such and rerun this command.');
|
||||||
msg,
|
if (cmd.developerOnly && !client.config.developers.find((dev) => msg.author.id == dev.id)) return;
|
||||||
args,
|
if (cmd.AuthorPermissions !== 'NONE' && !ctx.member.permissions.has(cmd.AuthorPermissions))
|
||||||
command: cmd,
|
return ctx.send(`You need \`${cmd.AuthorPermissions}\` Permission(s) to run this Command`);
|
||||||
me: msg.guild.me,
|
const now = Date.now();
|
||||||
guild: msg.guild,
|
const timestamps = client.cooldowns.get(cmd.name);
|
||||||
channel: msg.channel,
|
const cooldownAmount = (cmd.cooldown || 1) * 1000;
|
||||||
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 (!client.cooldowns.has(cmd.name)) {
|
if (timestamps.has(msg.author.id)) {
|
||||||
client.cooldowns.set(cmd.name, new Collection());
|
const expirationTime = timestamps.get(msg.author.id) + cooldownAmount;
|
||||||
}
|
|
||||||
|
|
||||||
if (cmd.guildOnly && !msg.guild) return;
|
if (now < expirationTime) {
|
||||||
if (
|
const timeLeft = (expirationTime - now) / 1000;
|
||||||
cmd.developerOnly &&
|
return ctx.send(
|
||||||
!client.config.developers.find(devs => msg.author.id == devs.id)
|
`\`${cmd.name}\` has a cooldown of \`${cmd.cooldown} second${cmd.cooldown > 1
|
||||||
)
|
? 's'
|
||||||
return;
|
: ''}\`, 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();
|
cmd.command(ctx).then(() => {}).catch(console.error);
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,36 +1,39 @@
|
||||||
const p = require('phin').defaults({
|
const p = require('phin').defaults({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
parse: 'json'
|
parse: 'json'
|
||||||
});
|
});
|
||||||
|
const hastebin = require('hastebin-gen');
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'messageReactionAdd',
|
name: 'messageReactionAdd',
|
||||||
run: async (client, reaction, user) => {
|
run: async (client, reaction, user) => {
|
||||||
if (user.bot) return;
|
if (user.bot) return;
|
||||||
|
if (user.id !== '318044130796109825') return;
|
||||||
if (!client.config.developers.find(id => id == user.id)) 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 == '📥') {
|
if (reaction.emoji.name == '🗑') {
|
||||||
try {
|
try {
|
||||||
if (!client.cache.lastEval) {
|
await reaction.message.delete();
|
||||||
await reaction.message.edit(`\`Unable to upload uncached eval results\``);
|
} catch (err) {}
|
||||||
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) {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
const { log } = require("../utils/index");
|
const { log } = require('../utils/index');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "ready",
|
name: 'ready',
|
||||||
run: async client => {
|
run: async (client) => {
|
||||||
log.hasStarted();
|
log.hasStarted();
|
||||||
client.user.setActivity(`@${client.user.username} help to get started`);
|
client.user.setActivity(`nyeh`, { type: 2 });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,90 +1,80 @@
|
||||||
const Command = require("../../src/structures/Command");
|
const Command = require('../../src/structures/Command');
|
||||||
const { table } = require("quick.db");
|
const { table } = require('quick.db');
|
||||||
const Servers = new table("servers");
|
const Servers = new table('servers');
|
||||||
const Users = new table("users");
|
const Users = new table('users');
|
||||||
|
const Bot = new table('bot');
|
||||||
|
|
||||||
const clean = text => {
|
const clean = (text) => {
|
||||||
if (typeof text == "string")
|
if (typeof text == 'string')
|
||||||
return text
|
return text.replace(/`/g, '`' + String.fromCharCode(8203)).replace(/@/g, '@' + String.fromCharCode(8203));
|
||||||
.replace(/`/g, "`" + String.fromCharCode(8203))
|
else return text;
|
||||||
.replace(/@/g, "@" + String.fromCharCode(8203));
|
|
||||||
else return text;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = class Eval extends Command {
|
module.exports = class Eval extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
super({
|
super({
|
||||||
name: "eval",
|
name: 'eval',
|
||||||
description: "Run JavaScript code directly from the process.",
|
description: 'Run JavaScript code directly from the process.',
|
||||||
aliases: ["ev", "e"],
|
aliases: [ 'ev', 'e' ],
|
||||||
module: "Developers",
|
module: 'Developers',
|
||||||
cooldown: 0,
|
cooldown: 0,
|
||||||
guildOnly: false,
|
guildOnly: false,
|
||||||
developerOnly: true
|
developerOnly: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async command(ctx) {
|
async command(ctx) {
|
||||||
if (!ctx.args.length) return;
|
if (!ctx.args.length) return;
|
||||||
|
|
||||||
const client = ctx.client;
|
const client = ctx.client;
|
||||||
|
|
||||||
let code = ctx.args.join(" ");
|
let code = ctx.args.join(' ');
|
||||||
let silent = false;
|
let silent = false;
|
||||||
|
|
||||||
if (code.endsWith("-s")) (code = code.split("-s")[0]), (silent = true);
|
if (code.endsWith('-s')) (code = code.split('-s')[0]), (silent = true);
|
||||||
if (code.endsWith("--silent"))
|
if (code.endsWith('--silent')) (code = code.split('--silent')[0]), (silent = true);
|
||||||
(code = code.split("--silent")[0]), (silent = true);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let evaled = await eval(code);
|
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(
|
evaled.replace(new RegExp(client.token.replace(/\./g, '\\.', 'g')), 'uwu');
|
||||||
new RegExp(client.token.replace(/\./g, "\\.", "g")),
|
|
||||||
"uwu"
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!silent) {
|
if (!silent) {
|
||||||
ctx
|
ctx
|
||||||
.send(`\`\`\`js\n${clean(evaled)}\n\`\`\``)
|
.send(`\`\`\`js\n${clean(evaled)}\n\`\`\``)
|
||||||
.then(async m => {
|
.then(async (m) => {
|
||||||
await m.react("📥");
|
await m.react('📥');
|
||||||
await m.react("🗑");
|
await m.react('🗑');
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch((err) => {
|
||||||
ctx
|
ctx
|
||||||
.send(
|
.send(`\`Content is over 2,000 characters: react to upload to Hastebin\``)
|
||||||
`\`Content is over 2,000 characters: react to upload to Hastebin\``
|
.then(async (m) => {
|
||||||
)
|
client.lastEval = clean(evaled);
|
||||||
.then(async m => {
|
|
||||||
client.lastEval = clean(evaled);
|
|
||||||
|
|
||||||
await m.react("📥");
|
await m.react('📥');
|
||||||
await m.react("🗑");
|
await m.react('🗑');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
ctx
|
ctx
|
||||||
.send(`\`\`\`js\n${clean(error)}\n\`\`\``)
|
.send(`\`\`\`js\n${clean(error)}\n\`\`\``)
|
||||||
.then(async m => {
|
.then(async (m) => {
|
||||||
await m.react("📥");
|
await m.react('📥');
|
||||||
await m.react("🗑");
|
await m.react('🗑');
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch((err) => {
|
||||||
ctx
|
ctx.send(`\`Content is over 2,000 characters: react to upload to Hastebin\``).then(async (m) => {
|
||||||
.send(
|
client.lastEval = clean(error);
|
||||||
`\`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('🗑');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,39 +1,38 @@
|
||||||
const Command = require('../../src/structures/Command');
|
const Command = require('../../src/structures/Command');
|
||||||
|
|
||||||
module.exports = class Reload extends Command {
|
module.exports = class Reload extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
super({
|
super({
|
||||||
name: 'reload',
|
name: 'reload',
|
||||||
description: 'Reload a command without restarting the process.',
|
description: 'Reload a command without restarting the process.',
|
||||||
aliases: ['re'],
|
aliases: [ 're' ],
|
||||||
module: 'Developers',
|
module: 'Developers',
|
||||||
cooldown: 0,
|
cooldown: 0,
|
||||||
guildOnly: false,
|
guildOnly: false,
|
||||||
developerOnly: true
|
developerOnly: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async command(ctx) {
|
async command(ctx) {
|
||||||
if (!ctx.args.length) return;
|
if (!ctx.args.length) return;
|
||||||
const date = Date.now();
|
const date = Date.now();
|
||||||
|
|
||||||
const data = ctx.args[0];
|
const data = ctx.args[0];
|
||||||
const [module,command] = data.split('/');
|
const [ module, command ] = data.split('/');
|
||||||
|
|
||||||
if (!module || !command) return;
|
if (!module || !command) return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
delete require.cache[require.resolve(`../${module}/${command}`)];
|
delete require.cache[require.resolve(`../${module}/${command}`)];
|
||||||
delete ctx.client.commands.get(command);
|
delete ctx.client.commands.get(command);
|
||||||
|
|
||||||
const cmd = require(`../${module}/${command}`);
|
const cmd = require(`../${module}/${command}`);
|
||||||
const Command = new cmd();
|
const Command = new cmd();
|
||||||
ctx.client.commands.set(Command.name, Command);
|
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.`);
|
||||||
return ctx.send(`Reloaded \`${Command.name}\` in ${(Date.now() - date) / 1000}s.`);
|
} catch (err) {
|
||||||
} catch(err) {
|
return ctx.send(`Failed to reload the command.\n\`${err}\``);
|
||||||
return ctx.send(`Failed to reload the command.\n\`${err}\``);
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
}
|
|
||||||
|
|
|
@ -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);
|
|
||||||
}
|
|
||||||
};
|
|
|
@ -1,18 +1,19 @@
|
||||||
const Command = require("../../src/structures/Command");
|
const Command = require('../../src/structures/Command');
|
||||||
module.exports = class Stop extends Command {
|
module.exports = class Stop extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
super({
|
super({
|
||||||
name: "stop",
|
name: 'stop',
|
||||||
description: "Stops the bot",
|
description: 'Stops the bot',
|
||||||
aliases: [],
|
aliases: [],
|
||||||
module: "Developers",
|
module: 'Developers',
|
||||||
cooldown: 0,
|
cooldown: 0,
|
||||||
guildOnly: false,
|
guildOnly: false,
|
||||||
developerOnly: true
|
developerOnly: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async command(ctx) {
|
async command(ctx) {
|
||||||
process.exit();
|
await ctx.send('Restarting.');
|
||||||
}
|
process.exit();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,104 +1,126 @@
|
||||||
const Command = require("../../src/structures/Command");
|
const Command = require('../../src/structures/Command');
|
||||||
const { MessageEmbed } = require("discord.js");
|
const { MessageEmbed } = require('discord.js');
|
||||||
|
|
||||||
module.exports = class Help extends Command {
|
module.exports = class Help extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
super({
|
super({
|
||||||
name: "help",
|
name: 'help',
|
||||||
description:
|
description: 'View a list of available commands or information on a specific command.',
|
||||||
"View a list of available commands, or view information on a specific command.",
|
aliases: [ 'h' ],
|
||||||
aliases: ["h"],
|
module: 'General',
|
||||||
module: "General",
|
cooldown: 0,
|
||||||
cooldown: 0,
|
guildOnly: false,
|
||||||
guildOnly: false,
|
developerOnly: false
|
||||||
developerOnly: false
|
});
|
||||||
});
|
}
|
||||||
}
|
|
||||||
|
|
||||||
async command(ctx) {
|
async command(ctx) {
|
||||||
if (!ctx.args.length) {
|
if (!ctx.args.length) {
|
||||||
const commands = [
|
const commands = [
|
||||||
[
|
[
|
||||||
"General",
|
'General',
|
||||||
ctx.client.commands
|
ctx.client.commands
|
||||||
.filter(command => command.module == "General")
|
.filter((command) => command.module == 'General')
|
||||||
.map(command => `**${command.name}** - ${command.description}`)
|
.map((command) => `${command.name}`)
|
||||||
.join("\n")
|
.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)
|
if (ctx.isDeveloper)
|
||||||
commands.push([
|
commands.push([
|
||||||
"Developers",
|
'Developers',
|
||||||
ctx.client.commands
|
ctx.client.commands
|
||||||
.filter(command => command.module == "Developers")
|
.filter((command) => command.module == 'Developers')
|
||||||
.map(command => command.name)
|
.map((command) => `${command.name}`)
|
||||||
.join(", ")
|
.join(' | ')
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return ctx.send({
|
return ctx.send({
|
||||||
embed: {
|
embed: {
|
||||||
fields: commands.map(group => {
|
description: `Use \`'help command\` to get help on a specific command`,
|
||||||
return new Object({
|
fields: commands.map((group) => {
|
||||||
name: group[0],
|
return new Object({
|
||||||
value: group[1]
|
name: group[0],
|
||||||
});
|
value: group[1]
|
||||||
}),
|
});
|
||||||
color: 0xff873f
|
}),
|
||||||
}
|
color: 0xff873f
|
||||||
});
|
}
|
||||||
} else {
|
});
|
||||||
const command = ctx.client.commands.find(
|
} else {
|
||||||
c =>
|
const command = ctx.client.commands.find(
|
||||||
c.name == ctx.args[0].toLowerCase() ||
|
(c) =>
|
||||||
(c.aliases && c.aliases.includes(ctx.args[0].toLowerCase()))
|
c.name == ctx.args[0].toLowerCase() || (c.aliases && c.aliases.includes(ctx.args[0].toLowerCase()))
|
||||||
);
|
);
|
||||||
|
|
||||||
let fields = [
|
let fields = [
|
||||||
{
|
{
|
||||||
name: "Module",
|
name: 'Module',
|
||||||
value: command.module,
|
value: command.module,
|
||||||
inline: true
|
inline: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Aliases",
|
name: 'Aliases',
|
||||||
value:
|
value: command.aliases.length == 0 ? 'No aliases' : command.aliases.join(', '),
|
||||||
command.aliases.length == 0
|
inline: true
|
||||||
? "No aliases"
|
},
|
||||||
: command.aliases.join(", "),
|
{
|
||||||
inline: true
|
name: 'Cooldown',
|
||||||
},
|
value: command.cooldown == 0 ? 'No cooldown' : `${command.cooldown}s`,
|
||||||
{
|
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: "Server only?",
|
},
|
||||||
value: command.guildOnly ? "Yes" : "No",
|
{
|
||||||
inline: true
|
name: 'Developers only?',
|
||||||
},
|
value: command.developerOnly ? 'Yes' : 'No',
|
||||||
{
|
inline: true
|
||||||
name: "Developers only?",
|
}
|
||||||
value: command.developerOnly ? "Yes" : "No",
|
];
|
||||||
inline: true
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
if (!command)
|
if (!command)
|
||||||
return ctx.send(
|
return ctx.send(`That command couldn't be found. See the \`help\` command for valid commands.`);
|
||||||
`That command couldn't be found. See the \`help\` command for valid commands.`
|
|
||||||
);
|
|
||||||
|
|
||||||
let embed = new MessageEmbed()
|
let embed = new MessageEmbed()
|
||||||
.setTitle(command.name)
|
.setTitle(command.name)
|
||||||
.setDescription(command.description)
|
.setDescription(command.description)
|
||||||
.setColor(0xff873f);
|
.setColor(0xff873f);
|
||||||
fields.forEach(i => {
|
fields.forEach((i) => {
|
||||||
embed.addField(i.name, i.value, i.inline);
|
embed.addField(i.name, i.value, i.inline);
|
||||||
});
|
});
|
||||||
|
|
||||||
return ctx.send(embed);
|
return ctx.send(embed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,42 +1,53 @@
|
||||||
const Command = require("../../src/structures/Command");
|
const Command = require('../../src/structures/Command');
|
||||||
const { MessageEmbed } = require("discord.js");
|
const { MessageEmbed, version: DiscordVersion } = require('discord.js');
|
||||||
const { developers, contributors, source } = require("../../config");
|
const { developers, contributors, source, color } = require('../../config');
|
||||||
const { version: DiscordVersion } = require("discord.js");
|
const db = require('quick.db');
|
||||||
|
const Backend = new db.table('backend');
|
||||||
module.exports = class Info extends Command {
|
module.exports = class Info extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
super({
|
super({
|
||||||
name: "info",
|
name: 'info',
|
||||||
description: "Show the Makers and Contributors of the Bot",
|
description: 'Show the Makers and Contributors of the Bot',
|
||||||
aliases: ["about"],
|
aliases: [ 'about' ],
|
||||||
module: "General",
|
module: 'General',
|
||||||
cooldown: 0,
|
cooldown: 0,
|
||||||
guildOnly: false,
|
guildOnly: false,
|
||||||
developerOnly: false
|
developerOnly: false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async command(ctx) {
|
async command(ctx) {
|
||||||
let result;
|
let result;
|
||||||
const contribs = [];
|
const contribs = [];
|
||||||
for (const { id, nick, reason } of contributors) {
|
for (const { id, nick, reason } of contributors) {
|
||||||
const user = await ctx.client.users.fetch(id);
|
const user = await ctx.client.users.fetch(id);
|
||||||
contribs.push(`${user} (${nick}) - ${reason}`);
|
contribs.push(`${user} (${nick}) - ${reason}`);
|
||||||
}
|
}
|
||||||
const Contributors = contribs.join("\n");
|
const Contributors = contribs.join('\n');
|
||||||
let CreditEmbed = new MessageEmbed()
|
let CreditEmbed = new MessageEmbed()
|
||||||
.setTitle(`Thaldrin, a Random Image and Utility Bot`)
|
.setTitle(`${ctx.client.user.username}, a Random Image and Utility Bot`)
|
||||||
.setDescription(
|
.setColor(color)
|
||||||
`Made by ${ctx.utils.format.bold(
|
.setDescription(
|
||||||
ctx.client.users.find(user => user.id === "318044130796109825").tag
|
`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('Language', 'Javascript', true)
|
||||||
.addField("Node", `${process.version}`, true)
|
.addField('Library', `d.js - v${DiscordVersion}`, true)
|
||||||
.addField("Contributors", Contributors)
|
.addField('Node', `${process.version}`, true)
|
||||||
.addField("Source", `[gitdab.com/r/thaldrin](${source})`);
|
.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
DiscordModules/General/serverinfo.js
Normal file
70
DiscordModules/General/serverinfo.js
Normal 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
DiscordModules/General/system.js
Normal file
50
DiscordModules/General/system.js
Normal 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
DiscordModules/General/userinfo.js
Normal file
59
DiscordModules/General/userinfo.js
Normal 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
DiscordModules/Images/birb.js
Normal file
41
DiscordModules/Images/birb.js
Normal 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
DiscordModules/Images/cat.js
Normal file
41
DiscordModules/Images/cat.js
Normal 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);
|
||||||
|
}
|
||||||
|
};
|
|
@ -1,58 +1,46 @@
|
||||||
const Command = require("../../src/structures/Command");
|
const Command = require('../../src/structures/Command');
|
||||||
const yiff = require("yiff");
|
const yiff = require('yiff');
|
||||||
const { MessageEmbed } = require("discord.js");
|
const { MessageEmbed } = require('discord.js');
|
||||||
let Icon =
|
let Icon = 'https://werewoof.tech/e621.png';
|
||||||
"https://cdn6.aptoide.com/imgs/0/7/f/07f23fe390d6d20f47839932ea23c678_icon.png?w=240";
|
|
||||||
|
|
||||||
module.exports = class E621 extends Command {
|
module.exports = class E621 extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
super({
|
super({
|
||||||
name: "e621",
|
name: 'e621',
|
||||||
description: "Get Images from e621",
|
description: 'Get Images from e621',
|
||||||
aliases: ["e6"],
|
aliases: [ 'e6' ],
|
||||||
module: "Images",
|
module: 'Images',
|
||||||
cooldown: 5,
|
cooldown: 5,
|
||||||
guildOnly: false,
|
guildOnly: false,
|
||||||
developerOnly: false
|
developerOnly: false,
|
||||||
});
|
nsfw: true
|
||||||
}
|
});
|
||||||
|
}
|
||||||
async command(ctx) {
|
async command(ctx) {
|
||||||
let Embed = new MessageEmbed().setColor("RED");
|
let Embed = new MessageEmbed().setColor('RED');
|
||||||
if (!ctx.channel.nsfw) {
|
if (ctx.args < 1) {
|
||||||
Embed.setTitle("NSFW").setDescription(
|
Embed.setTitle('Search Terms').setDescription('I need more tags than that to search for an Image.');
|
||||||
`This channel is not marked as NSFW, please mark it as such and rerun this command.`
|
return ctx.send(Embed);
|
||||||
);
|
}
|
||||||
return ctx.send(Embed);
|
const Server = await ctx.db.servers.get(ctx.guild.id);
|
||||||
}
|
let Settings;
|
||||||
if (ctx.args < 1) {
|
if (Server === null) {
|
||||||
Embed.setTitle("Search Terms").setDescription(
|
Settings = ctx.utils.db.defaults.server;
|
||||||
"I need more tags than that to search for an Image."
|
} else {
|
||||||
);
|
Settings = Server;
|
||||||
return ctx.send(Embed);
|
}
|
||||||
}
|
let req;
|
||||||
|
let Message;
|
||||||
const Server = await ctx.db.servers.get(ctx.guild.id);
|
await yiff.e621.CubFilter(ctx.args.join(' ')).then((E) => (req = E));
|
||||||
let Settings;
|
if (Settings.embeds) {
|
||||||
if (Server === null) {
|
Message = new MessageEmbed()
|
||||||
Settings = ctx.utils.db.defaults.server;
|
.setImage(req.image)
|
||||||
} else {
|
.setColor(ctx.config.color)
|
||||||
Settings = Server;
|
.setAuthor('e621.net', Icon, `https://e621.net/post/show/${req.postID}`)
|
||||||
}
|
.setFooter(`${ctx.client.user.username} - e621.net`, ctx.client.user.avatarURL());
|
||||||
|
} else {
|
||||||
let message = await ctx.send(`Searching...`);
|
Message = `<https://e621.net/post/show/${req.postID}>\n${req.image}`;
|
||||||
|
}
|
||||||
let req;
|
ctx.send(Message);
|
||||||
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);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
46
DiscordModules/Images/e926.js
Normal file
46
DiscordModules/Images/e926.js
Normal 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
DiscordModules/Images/fox.js
Normal file
41
DiscordModules/Images/fox.js
Normal 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
DiscordModules/Images/shibe.js
Normal file
42
DiscordModules/Images/shibe.js
Normal 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
DiscordModules/Images/wolf.js
Normal file
41
DiscordModules/Images/wolf.js
Normal 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
DiscordModules/Roleplay/bang.js
Normal file
65
DiscordModules/Roleplay/bang.js
Normal 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
DiscordModules/Roleplay/boop.js
Normal file
65
DiscordModules/Roleplay/boop.js
Normal 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
DiscordModules/Roleplay/bulge.js
Normal file
59
DiscordModules/Roleplay/bulge.js
Normal 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
DiscordModules/Roleplay/cuddle.js
Normal file
66
DiscordModules/Roleplay/cuddle.js
Normal 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
DiscordModules/Roleplay/hold.js
Normal file
65
DiscordModules/Roleplay/hold.js
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
const Command = require('../../src/structures/Command');
|
||||||
|
const yiff = require('yiff');
|
||||||
|
const { MessageEmbed } = require('discord.js');
|
||||||
|
|
||||||
|
module.exports = class Hold extends Command {
|
||||||
|
constructor() {
|
||||||
|
super({
|
||||||
|
name: 'hold',
|
||||||
|
description: 'Hold 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 hold me! Hold someone else!");
|
||||||
|
if (ctx.msg.mentions.members.first().id === ctx.author.id)
|
||||||
|
return ctx.send(`Don't you want to hold 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.hold[parseInt(Math.random() * ctx.utils.int.hold.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.hold().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);
|
||||||
|
}
|
||||||
|
};
|
54
DiscordModules/Roleplay/hug.js
Normal file
54
DiscordModules/Roleplay/hug.js
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
const Command = require('../../src/structures/Command');
|
||||||
|
const yiff = require('yiff');
|
||||||
|
const { MessageEmbed } = require('discord.js');
|
||||||
|
|
||||||
|
module.exports = class Hug extends Command {
|
||||||
|
constructor() {
|
||||||
|
super({
|
||||||
|
name: 'hug',
|
||||||
|
description: 'Hug 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 hug me! Hug someone else!");
|
||||||
|
if (ctx.msg.mentions.members.first().id === ctx.author.id)
|
||||||
|
return ctx.send(`Don't you want to hug someone other than yourself?`);
|
||||||
|
|
||||||
|
const LineFromUtils = ctx.utils.int.hug[parseInt(Math.random() * ctx.utils.int.hug.length)];
|
||||||
|
let 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)
|
||||||
|
);
|
||||||
|
|
||||||
|
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.furrybot.sfw.hug().then((E) => (req = E));
|
||||||
|
|
||||||
|
if (Settings.embeds) {
|
||||||
|
Message = new MessageEmbed()
|
||||||
|
.setColor(ctx.config.color)
|
||||||
|
.setDescription(Line)
|
||||||
|
.setImage(req)
|
||||||
|
.setFooter(`${ctx.client.user.username} - Provided by furry.bot`, ctx.client.user.avatarURL());
|
||||||
|
} else {
|
||||||
|
Message = `${req}`;
|
||||||
|
}
|
||||||
|
ctx.send(Message);
|
||||||
|
}
|
||||||
|
};
|
59
DiscordModules/Roleplay/kiss.js
Normal file
59
DiscordModules/Roleplay/kiss.js
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
const Command = require('../../src/structures/Command');
|
||||||
|
const yiff = require('yiff');
|
||||||
|
const { MessageEmbed } = require('discord.js');
|
||||||
|
|
||||||
|
module.exports = class Kiss extends Command {
|
||||||
|
constructor() {
|
||||||
|
super({
|
||||||
|
name: 'kiss',
|
||||||
|
description: 'Kiss a user',
|
||||||
|
aliases: [ 'smooch' ],
|
||||||
|
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 kiss me! Kiss someone else!");
|
||||||
|
if (ctx.msg.mentions.members.first().id === ctx.author.id)
|
||||||
|
return ctx.send(`Don't you want to kiss 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.kiss[parseInt(Math.random() * ctx.utils.int.kiss.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.kiss().then((E) => (req = E));
|
||||||
|
|
||||||
|
if (Settings.embeds) {
|
||||||
|
Message = new MessageEmbed()
|
||||||
|
.setColor(ctx.config.color)
|
||||||
|
.setDescription(Line)
|
||||||
|
.setImage(req)
|
||||||
|
.setFooter(`${ctx.client.user.username} - Provided by furry.bot`, ctx.client.user.avatarURL());
|
||||||
|
} else {
|
||||||
|
Message = `${req}`;
|
||||||
|
}
|
||||||
|
ctx.send(Message);
|
||||||
|
}
|
||||||
|
};
|
65
DiscordModules/Roleplay/lick.js
Normal file
65
DiscordModules/Roleplay/lick.js
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
const Command = require('../../src/structures/Command');
|
||||||
|
const yiff = require('yiff');
|
||||||
|
const { MessageEmbed } = require('discord.js');
|
||||||
|
|
||||||
|
module.exports = class Lick extends Command {
|
||||||
|
constructor() {
|
||||||
|
super({
|
||||||
|
name: 'lick',
|
||||||
|
description: 'lick a user',
|
||||||
|
aliases: [ 'mlem' ],
|
||||||
|
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 lick me! Lick someone else!");
|
||||||
|
if (ctx.msg.mentions.members.first().id === ctx.author.id)
|
||||||
|
return ctx.send(`Don't you want to Lick 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.lick[parseInt(Math.random() * ctx.utils.int.lick.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.lick().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
DiscordModules/Roleplay/ncuddle.js
Normal file
65
DiscordModules/Roleplay/ncuddle.js
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
const Command = require('../../src/structures/Command');
|
||||||
|
const yiff = require('yiff');
|
||||||
|
const { MessageEmbed } = require('discord.js');
|
||||||
|
|
||||||
|
module.exports = class nCuddle extends Command {
|
||||||
|
constructor() {
|
||||||
|
super({
|
||||||
|
name: 'ncuddle',
|
||||||
|
description: 'Cuddle a user',
|
||||||
|
aliases: [ 'nsnug', 'nsnuggle' ],
|
||||||
|
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 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)];
|
||||||
|
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.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
DiscordModules/Roleplay/nhold.js
Normal file
65
DiscordModules/Roleplay/nhold.js
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
const Command = require('../../src/structures/Command');
|
||||||
|
const yiff = require('yiff');
|
||||||
|
const { MessageEmbed } = require('discord.js');
|
||||||
|
|
||||||
|
module.exports = class nHold extends Command {
|
||||||
|
constructor() {
|
||||||
|
super({
|
||||||
|
name: 'nhold',
|
||||||
|
description: 'Hold a user',
|
||||||
|
aliases: [],
|
||||||
|
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 hold me! Hold someone else!");
|
||||||
|
if (ctx.msg.mentions.members.first().id === ctx.author.id)
|
||||||
|
return ctx.send(`Don't you want to hold 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.hold[parseInt(Math.random() * ctx.utils.int.hold.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.hold().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);
|
||||||
|
}
|
||||||
|
};
|
64
DiscordModules/Roleplay/nhug.js
Normal file
64
DiscordModules/Roleplay/nhug.js
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
const Command = require('../../src/structures/Command');
|
||||||
|
const yiff = require('yiff');
|
||||||
|
const { MessageEmbed } = require('discord.js');
|
||||||
|
|
||||||
|
module.exports = class nHug extends Command {
|
||||||
|
constructor() {
|
||||||
|
super({
|
||||||
|
name: 'nhug',
|
||||||
|
description: 'Hug a user',
|
||||||
|
aliases: [],
|
||||||
|
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 hug me! Hug someone else!");
|
||||||
|
if (ctx.msg.mentions.members.first().id === ctx.author.id)
|
||||||
|
return ctx.send(`Don't you want to hug someone other than yourself?`);
|
||||||
|
let Line;
|
||||||
|
const Server = await ctx.db.servers.get(ctx.guild.id);
|
||||||
|
if (Server.rp_text) {
|
||||||
|
const LineFromUtils = ctx.utils.int.hug[parseInt(Math.random() * ctx.utils.int.hug.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.hug().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);
|
||||||
|
}
|
||||||
|
};
|
64
DiscordModules/Roleplay/nkiss.js
Normal file
64
DiscordModules/Roleplay/nkiss.js
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
const Command = require('../../src/structures/Command');
|
||||||
|
const yiff = require('yiff');
|
||||||
|
const { MessageEmbed } = require('discord.js');
|
||||||
|
|
||||||
|
module.exports = class nKiss extends Command {
|
||||||
|
constructor() {
|
||||||
|
super({
|
||||||
|
name: 'nkiss',
|
||||||
|
description: 'Kiss a user',
|
||||||
|
aliases: [ 'nsmooch' ],
|
||||||
|
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 kiss me! Kiss someone else!");
|
||||||
|
if (ctx.msg.mentions.members.first().id === ctx.author.id)
|
||||||
|
return ctx.send(`Don't you want to kiss someone other than yourself?`);
|
||||||
|
|
||||||
|
if (Server.rp_text) {
|
||||||
|
const LineFromUtils = ctx.utils.int.kiss[parseInt(Math.random() * ctx.utils.int.kiss.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;
|
||||||
|
}
|
||||||
|
|
||||||
|
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.furrybot.nsfw.kiss().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);
|
||||||
|
}
|
||||||
|
};
|
64
DiscordModules/Roleplay/nlick.js
Normal file
64
DiscordModules/Roleplay/nlick.js
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
const Command = require('../../src/structures/Command');
|
||||||
|
const yiff = require('yiff');
|
||||||
|
const { MessageEmbed } = require('discord.js');
|
||||||
|
|
||||||
|
module.exports = class nLick extends Command {
|
||||||
|
constructor() {
|
||||||
|
super({
|
||||||
|
name: 'nlick',
|
||||||
|
description: 'lick a user',
|
||||||
|
aliases: [ 'nmlem' ],
|
||||||
|
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 lick me! Lick someone else!");
|
||||||
|
if (ctx.msg.mentions.members.first().id === ctx.author.id)
|
||||||
|
return ctx.send(`Don't you want to Lick 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.lick[parseInt(Math.random() * ctx.utils.int.lick.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.lick().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
DiscordModules/Settings/prefix.js
Normal file
59
DiscordModules/Settings/prefix.js
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
const Command = require('../../src/structures/Command');
|
||||||
|
module.exports = class Prefix extends Command {
|
||||||
|
constructor() {
|
||||||
|
super({
|
||||||
|
name: 'prefix',
|
||||||
|
description: 'Add or Remove a prefix',
|
||||||
|
aliases: [],
|
||||||
|
module: 'Settings',
|
||||||
|
cooldown: 10,
|
||||||
|
guildOnly: true,
|
||||||
|
developerOnly: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async command(ctx) {
|
||||||
|
const PrefixEmbed = new ctx.utils.discord.MessageEmbed();
|
||||||
|
PrefixEmbed.setColor(ctx.config.color);
|
||||||
|
let ARG = ctx.args[0];
|
||||||
|
ctx.args.shift();
|
||||||
|
let Prefix = ctx.args.join(' ');
|
||||||
|
let Server = await ctx.db.servers.get(ctx.guild.id);
|
||||||
|
Server.prefix.shift();
|
||||||
|
Server.prefix.shift();
|
||||||
|
Server.prefix.shift();
|
||||||
|
switch (ARG) {
|
||||||
|
case 'a':
|
||||||
|
case 'add':
|
||||||
|
if (ctx.args === [] || ctx.args.join(' ').trim() === '') return ctx.send('No Prefix was given');
|
||||||
|
|
||||||
|
ctx.utils.db.prefix
|
||||||
|
.add(ctx, Prefix)
|
||||||
|
.then(async () => {
|
||||||
|
let NServer = await ctx.db.servers.get(ctx.guild.id);
|
||||||
|
PrefixEmbed.setTitle(`Prefixes for ${ctx.guild.name}`);
|
||||||
|
PrefixEmbed.setDescription(`${NServer.prefix.join(', ') || ctx.db.defaults.server.prefix}`);
|
||||||
|
ctx.send(PrefixEmbed);
|
||||||
|
})
|
||||||
|
.catch((err) => ctx.send(err));
|
||||||
|
break;
|
||||||
|
case 'r':
|
||||||
|
case 'remove':
|
||||||
|
if (ctx.args === [] || ctx.args.join(' ').trim() === '') return ctx.send('No Prefix was given');
|
||||||
|
ctx.utils.db.prefix
|
||||||
|
.remove(ctx, Prefix)
|
||||||
|
.then(async (r) => {
|
||||||
|
let NServer = await ctx.db.servers.get(ctx.guild.id);
|
||||||
|
ctx.send('Current Prefixes are:\n' + NServer.prefix.join(', '));
|
||||||
|
})
|
||||||
|
.catch((err) => ctx.send(err));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
PrefixEmbed.setTitle('Help');
|
||||||
|
PrefixEmbed.addField('a / add <prefix>', 'Add a Prefix', true);
|
||||||
|
PrefixEmbed.addField('r / remove <prefix>', 'Remove a Prefix', true);
|
||||||
|
ctx.send(PrefixEmbed);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
|
@ -1,62 +1,54 @@
|
||||||
const Command = require("../../src/structures/Command");
|
const Command = require('../../src/structures/Command');
|
||||||
module.exports = class Settings extends Command {
|
module.exports = class Settings extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
super({
|
super({
|
||||||
name: "settings",
|
name: 'settings',
|
||||||
description: "Show the Settings of this Server",
|
description: 'Show the Settings of this Server',
|
||||||
aliases: ["config"],
|
aliases: [ 'config' ],
|
||||||
module: "Settings",
|
module: 'Settings',
|
||||||
cooldown: 5,
|
cooldown: 5,
|
||||||
guildOnly: true,
|
guildOnly: true,
|
||||||
developerOnly: false
|
developerOnly: false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async command(ctx) {
|
async command(ctx) {
|
||||||
const SettingsEmbed = new ctx.utils.discord.MessageEmbed();
|
const SettingsEmbed = new ctx.utils.discord.MessageEmbed();
|
||||||
const Server = await ctx.db.servers.get(ctx.guild.id);
|
SettingsEmbed.setColor(ctx.config.color);
|
||||||
// console.log(Server);
|
const Server = await ctx.db.servers.get(ctx.guild.id);
|
||||||
if (Server !== null) {
|
// console.log(Server);
|
||||||
SettingsEmbed.setTitle(`Settings for ${ctx.guild.name}`)
|
if (Server !== null) {
|
||||||
.addField("Prefixes", Server.prefix.join(", "), false)
|
SettingsEmbed.setTitle(`Settings for ${ctx.guild.name}`)
|
||||||
.addField(
|
.addField('Prefixes', Server.prefix.join(', ') || `<@${ctx.client.user.id}> or \`'\``, false)
|
||||||
"SourceFynnder",
|
.addField(
|
||||||
Server.SourceFynnder
|
'SourceFynnder',
|
||||||
? ctx.utils.emotes.settings.on
|
Server.SourceFynnder ? ctx.utils.emotes.settings.on : ctx.utils.emotes.settings.off,
|
||||||
: ctx.utils.emotes.settings.off,
|
true
|
||||||
true
|
)
|
||||||
)
|
.addField(
|
||||||
.addField(
|
'Shortlinks',
|
||||||
"Shortlinks",
|
Server.Shortlinks ? ctx.utils.emotes.settings.on : ctx.utils.emotes.settings.off,
|
||||||
Server.Shortlinks
|
true
|
||||||
? ctx.utils.emotes.settings.on
|
)
|
||||||
: ctx.utils.emotes.settings.off,
|
.addBlankField(true)
|
||||||
true
|
.addField(
|
||||||
)
|
'Image Embeds',
|
||||||
.addBlankField(true)
|
Server.embeds ? ctx.utils.emotes.settings.on : ctx.utils.emotes.settings.off,
|
||||||
.addField(
|
true
|
||||||
"Image Embeds",
|
)
|
||||||
Server.embeds
|
.addField(
|
||||||
? ctx.utils.emotes.settings.on
|
'Image Text',
|
||||||
: ctx.utils.emotes.settings.off,
|
Server.rp_text ? ctx.utils.emotes.settings.on : ctx.utils.emotes.settings.off,
|
||||||
true
|
true
|
||||||
)
|
);
|
||||||
.addField(
|
// .addField('Default Yiff', Server.default_yiff, true);
|
||||||
"Image Text",
|
ctx.send(SettingsEmbed);
|
||||||
Server.rp_text
|
} else {
|
||||||
? ctx.utils.emotes.settings.on
|
SettingsEmbed.setTitle(`No Settings for ${ctx.guild.name}`).setDescription(
|
||||||
: ctx.utils.emotes.settings.off,
|
`You shouldn't see this.\n Your Server might not have been set up Properly when you invited me.\n\nPlease [join my support server](https://discord.gg/xNAcF8m) and notify my Developer`
|
||||||
true
|
);
|
||||||
)
|
|
||||||
.addField("Default Yiff", Server.default_yiff, true);
|
ctx.send(SettingsEmbed);
|
||||||
ctx.send(SettingsEmbed);
|
}
|
||||||
} else {
|
}
|
||||||
SettingsEmbed.setTitle(
|
|
||||||
`No Settings for ${ctx.guild.name}`
|
|
||||||
).setDescription(
|
|
||||||
`You shouldn't see this.\n Your Server might not have been set up Properly when you invited me.\n\nPlease [join my support server](https://discord.gg/xNAcF8m) and notify my Developer`
|
|
||||||
);
|
|
||||||
ctx.send(SettingsEmbed);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
75
DiscordModules/Settings/toggle.js
Normal file
75
DiscordModules/Settings/toggle.js
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
const Command = require('../../src/structures/Command');
|
||||||
|
module.exports = class Toggle extends Command {
|
||||||
|
constructor() {
|
||||||
|
super({
|
||||||
|
name: 'toggle',
|
||||||
|
description: 'Toggle various Settings',
|
||||||
|
aliases: [ 't' ],
|
||||||
|
module: 'Settings',
|
||||||
|
cooldown: 5,
|
||||||
|
guildOnly: true,
|
||||||
|
developerOnly: false,
|
||||||
|
AuthorPermissions: [ 'MANAGE_GUILD' ]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async command(ctx) {
|
||||||
|
const Embed = new ctx.utils.discord.MessageEmbed().setColor(ctx.config.color);
|
||||||
|
let ARG = ctx.args[0];
|
||||||
|
switch (ARG) {
|
||||||
|
case 'source':
|
||||||
|
case 'sauce':
|
||||||
|
case 'sf':
|
||||||
|
case 'sourcefynnder':
|
||||||
|
await ctx.utils.db.toggle.SourceFynnder(ctx);
|
||||||
|
Embed.setTitle(`Changed SourceFynnder Setting`).setDescription(
|
||||||
|
`Now set to ${ctx.db.servers.get(ctx.guild.id).SourceFynnder
|
||||||
|
? ctx.utils.emotes.settings.on
|
||||||
|
: ctx.utils.emotes.settings.off}`
|
||||||
|
);
|
||||||
|
ctx.send(Embed);
|
||||||
|
break;
|
||||||
|
case 'shortlinks':
|
||||||
|
case 'shortlink':
|
||||||
|
case 'sl':
|
||||||
|
await ctx.utils.db.toggle.Shortlinks(ctx);
|
||||||
|
Embed.setTitle(`Changed Shortlink Setting`).setDescription(
|
||||||
|
`Now set to ${ctx.db.servers.get(ctx.guild.id).Shortlinks
|
||||||
|
? ctx.utils.emotes.settings.on
|
||||||
|
: ctx.utils.emotes.settings.off}`
|
||||||
|
);
|
||||||
|
ctx.send(Embed);
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 'embed':
|
||||||
|
case 'embeds':
|
||||||
|
await ctx.utils.db.toggle.Embeds(ctx);
|
||||||
|
Embed.setTitle(`Changed Image Embed Setting`).setDescription(
|
||||||
|
`Now set to ${ctx.db.servers.get(ctx.guild.id).embeds
|
||||||
|
? ctx.utils.emotes.settings.on
|
||||||
|
: ctx.utils.emotes.settings.off}`
|
||||||
|
);
|
||||||
|
ctx.send(Embed);
|
||||||
|
break;
|
||||||
|
case 'text':
|
||||||
|
case 'rp_text':
|
||||||
|
await ctx.utils.db.toggle.Text(ctx);
|
||||||
|
Embed.setTitle(`Changed Image Text Setting`).setDescription(
|
||||||
|
`Now set to ${ctx.db.servers.get(ctx.guild.id).rp_text
|
||||||
|
? ctx.utils.emotes.settings.on
|
||||||
|
: ctx.utils.emotes.settings.off}`
|
||||||
|
);
|
||||||
|
ctx.send(Embed);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Embed.setTitle('Help')
|
||||||
|
.setDescription(`All settings have their own Toggles, see the list below to know which one's which`)
|
||||||
|
.addField('SourceFynnder', 'sf sauce source sourcefynnder', true)
|
||||||
|
.addField('Shortlinks', 'sl shortlink shortlinks', true)
|
||||||
|
.addField('Image Embeds', 'embed embeds', true)
|
||||||
|
.addField('Image Text', 'text rp_text', true);
|
||||||
|
ctx.send(Embed);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
16
index.js
16
index.js
|
@ -1,10 +1,12 @@
|
||||||
const Client = require("./src/index");
|
const Client = require('./src/index');
|
||||||
const config = require("./config");
|
const config = require('./config');
|
||||||
const { log } = require("./utils/index");
|
const { log } = require('./utils/index');
|
||||||
|
const yiff = require('yiff');
|
||||||
|
yiff.sheri.setToken(config.api.sheri);
|
||||||
|
|
||||||
const { util } = require("discord.js");
|
const { util } = require('discord.js');
|
||||||
|
|
||||||
util.fetchRecommendedShards(config.token).then(async count => {
|
util.fetchRecommendedShards(config.token).then(async (count) => {
|
||||||
await log.starting();
|
await log.starting();
|
||||||
new Client(config, count);
|
new Client(config, count);
|
||||||
});
|
});
|
||||||
|
|
BIN
json.sqlite
BIN
json.sqlite
Binary file not shown.
257
package-lock.json
generated
257
package-lock.json
generated
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "music-bot",
|
"name": "thaldrin",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
|
@ -44,6 +44,11 @@
|
||||||
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
|
||||||
"integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
|
"integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
|
||||||
},
|
},
|
||||||
|
"asap": {
|
||||||
|
"version": "2.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
|
||||||
|
"integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY="
|
||||||
|
},
|
||||||
"async-limiter": {
|
"async-limiter": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz",
|
||||||
|
@ -63,6 +68,19 @@
|
||||||
"is-buffer": "^2.0.2"
|
"is-buffer": "^2.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"balanced-match": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
|
||||||
|
},
|
||||||
|
"basic-auth": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==",
|
||||||
|
"requires": {
|
||||||
|
"safe-buffer": "5.1.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"better-sqlite3": {
|
"better-sqlite3": {
|
||||||
"version": "5.4.3",
|
"version": "5.4.3",
|
||||||
"resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-5.4.3.tgz",
|
"resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-5.4.3.tgz",
|
||||||
|
@ -109,6 +127,15 @@
|
||||||
"resolved": "https://registry.npmjs.org/bowser/-/bowser-2.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/bowser/-/bowser-2.7.0.tgz",
|
||||||
"integrity": "sha512-aIlMvstvu8x+34KEiOHD3AsBgdrzg6sxALYiukOWhFvGMbQI6TRP/iY0LMhUrHs56aD6P1G0Z7h45PUJaa5m9w=="
|
"integrity": "sha512-aIlMvstvu8x+34KEiOHD3AsBgdrzg6sxALYiukOWhFvGMbQI6TRP/iY0LMhUrHs56aD6P1G0Z7h45PUJaa5m9w=="
|
||||||
},
|
},
|
||||||
|
"brace-expansion": {
|
||||||
|
"version": "1.1.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||||
|
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||||
|
"requires": {
|
||||||
|
"balanced-match": "^1.0.0",
|
||||||
|
"concat-map": "0.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"bson": {
|
"bson": {
|
||||||
"version": "1.0.9",
|
"version": "1.0.9",
|
||||||
"resolved": "https://registry.npmjs.org/bson/-/bson-1.0.9.tgz",
|
"resolved": "https://registry.npmjs.org/bson/-/bson-1.0.9.tgz",
|
||||||
|
@ -188,6 +215,12 @@
|
||||||
"delayed-stream": "~1.0.0"
|
"delayed-stream": "~1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"commander": {
|
||||||
|
"version": "2.20.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
|
||||||
|
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
"compressible": {
|
"compressible": {
|
||||||
"version": "2.0.17",
|
"version": "2.0.17",
|
||||||
"resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.17.tgz",
|
"resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.17.tgz",
|
||||||
|
@ -210,6 +243,11 @@
|
||||||
"vary": "~1.1.2"
|
"vary": "~1.1.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"concat-map": {
|
||||||
|
"version": "0.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||||
|
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
|
||||||
|
},
|
||||||
"content-disposition": {
|
"content-disposition": {
|
||||||
"version": "0.5.3",
|
"version": "0.5.3",
|
||||||
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz",
|
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz",
|
||||||
|
@ -273,6 +311,14 @@
|
||||||
"clone": "^1.0.2"
|
"clone": "^1.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"define-properties": {
|
||||||
|
"version": "1.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
|
||||||
|
"integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
|
||||||
|
"requires": {
|
||||||
|
"object-keys": "^1.0.12"
|
||||||
|
}
|
||||||
|
},
|
||||||
"delayed-stream": {
|
"delayed-stream": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||||
|
@ -399,6 +445,18 @@
|
||||||
"vary": "~1.1.2"
|
"vary": "~1.1.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"express-handlebars": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/express-handlebars/-/express-handlebars-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-7QlaXnSREMmN5P2o4gmpUZDfJlLtfBka9d6r7/ccXaU7rPp76odw9YYtwZYdIiha2JqwiaG6o2Wu6NZJQ0u7Fg==",
|
||||||
|
"requires": {
|
||||||
|
"glob": "^7.1.3",
|
||||||
|
"graceful-fs": "^4.1.2",
|
||||||
|
"handlebars": "^4.1.2",
|
||||||
|
"object.assign": "^4.1.0",
|
||||||
|
"promise": "^8.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"feature-policy": {
|
"feature-policy": {
|
||||||
"version": "0.3.0",
|
"version": "0.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/feature-policy/-/feature-policy-0.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/feature-policy/-/feature-policy-0.3.0.tgz",
|
||||||
|
@ -474,11 +532,63 @@
|
||||||
"minipass": "^2.6.0"
|
"minipass": "^2.6.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"fs.realpath": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
|
||||||
|
},
|
||||||
|
"function-bind": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
|
||||||
|
},
|
||||||
|
"glob": {
|
||||||
|
"version": "7.1.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.5.tgz",
|
||||||
|
"integrity": "sha512-J9dlskqUXK1OeTOYBEn5s8aMukWMwWfs+rPTn/jn50Ux4MNXVhubL1wu/j2t+H4NVI+cXEcCaYellqaPVGXNqQ==",
|
||||||
|
"requires": {
|
||||||
|
"fs.realpath": "^1.0.0",
|
||||||
|
"inflight": "^1.0.4",
|
||||||
|
"inherits": "2",
|
||||||
|
"minimatch": "^3.0.4",
|
||||||
|
"once": "^1.3.0",
|
||||||
|
"path-is-absolute": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"graceful-fs": {
|
||||||
|
"version": "4.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz",
|
||||||
|
"integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ=="
|
||||||
|
},
|
||||||
|
"handlebars": {
|
||||||
|
"version": "4.5.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.1.tgz",
|
||||||
|
"integrity": "sha512-C29UoFzHe9yM61lOsIlCE5/mQVGrnIOrOq7maQl76L7tYPCgC1og0Ajt6uWnX4ZTxBPnjw+CUvawphwCfJgUnA==",
|
||||||
|
"requires": {
|
||||||
|
"neo-async": "^2.6.0",
|
||||||
|
"optimist": "^0.6.1",
|
||||||
|
"source-map": "^0.6.1",
|
||||||
|
"uglify-js": "^3.1.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
"has-flag": {
|
"has-flag": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
||||||
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
|
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
|
||||||
},
|
},
|
||||||
|
"has-symbols": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q="
|
||||||
|
},
|
||||||
|
"hastebin-gen": {
|
||||||
|
"version": "2.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/hastebin-gen/-/hastebin-gen-2.0.5.tgz",
|
||||||
|
"integrity": "sha512-At1LaKtcqh2jiP8xfE2sDGT9IshIki6FqsgLwn2y7FzAvlFJRtpUsSPh3yWjWIQIvxi/GPF07IBqSI8WhPL/gQ==",
|
||||||
|
"requires": {
|
||||||
|
"node-fetch": "^2.6.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"helmet": {
|
"helmet": {
|
||||||
"version": "3.21.1",
|
"version": "3.21.1",
|
||||||
"resolved": "https://registry.npmjs.org/helmet/-/helmet-3.21.1.tgz",
|
"resolved": "https://registry.npmjs.org/helmet/-/helmet-3.21.1.tgz",
|
||||||
|
@ -574,6 +684,15 @@
|
||||||
"resolved": "https://registry.npmjs.org/ienoopen/-/ienoopen-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/ienoopen/-/ienoopen-1.1.0.tgz",
|
||||||
"integrity": "sha512-MFs36e/ca6ohEKtinTJ5VvAJ6oDRAYFdYXweUnGY9L9vcoqFOU4n2ZhmJ0C4z/cwGZ3YIQRSB3XZ1+ghZkY5NQ=="
|
"integrity": "sha512-MFs36e/ca6ohEKtinTJ5VvAJ6oDRAYFdYXweUnGY9L9vcoqFOU4n2ZhmJ0C4z/cwGZ3YIQRSB3XZ1+ghZkY5NQ=="
|
||||||
},
|
},
|
||||||
|
"inflight": {
|
||||||
|
"version": "1.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||||
|
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
|
||||||
|
"requires": {
|
||||||
|
"once": "^1.3.0",
|
||||||
|
"wrappy": "1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"inherits": {
|
"inherits": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
||||||
|
@ -670,6 +789,14 @@
|
||||||
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
|
||||||
"integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="
|
"integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="
|
||||||
},
|
},
|
||||||
|
"minimatch": {
|
||||||
|
"version": "3.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||||
|
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||||
|
"requires": {
|
||||||
|
"brace-expansion": "^1.1.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "0.0.8",
|
"version": "0.0.8",
|
||||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
||||||
|
@ -755,6 +882,18 @@
|
||||||
"xtend": "^4.0.1"
|
"xtend": "^4.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"morgan": {
|
||||||
|
"version": "1.9.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/morgan/-/morgan-1.9.1.tgz",
|
||||||
|
"integrity": "sha512-HQStPIV4y3afTiCYVxirakhlCfGkI161c76kKFca7Fk1JusM//Qeo1ej2XaMniiNeaZklMVrh3vTtIzpzwbpmA==",
|
||||||
|
"requires": {
|
||||||
|
"basic-auth": "~2.0.0",
|
||||||
|
"debug": "2.6.9",
|
||||||
|
"depd": "~1.1.2",
|
||||||
|
"on-finished": "~2.3.0",
|
||||||
|
"on-headers": "~1.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"ms": {
|
"ms": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||||
|
@ -770,6 +909,11 @@
|
||||||
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
|
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
|
||||||
"integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw=="
|
"integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw=="
|
||||||
},
|
},
|
||||||
|
"neo-async": {
|
||||||
|
"version": "2.6.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz",
|
||||||
|
"integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw=="
|
||||||
|
},
|
||||||
"nocache": {
|
"nocache": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/nocache/-/nocache-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/nocache/-/nocache-2.1.0.tgz",
|
||||||
|
@ -793,6 +937,22 @@
|
||||||
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||||
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
|
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
|
||||||
},
|
},
|
||||||
|
"object-keys": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA=="
|
||||||
|
},
|
||||||
|
"object.assign": {
|
||||||
|
"version": "4.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz",
|
||||||
|
"integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==",
|
||||||
|
"requires": {
|
||||||
|
"define-properties": "^1.1.2",
|
||||||
|
"function-bind": "^1.1.1",
|
||||||
|
"has-symbols": "^1.0.0",
|
||||||
|
"object-keys": "^1.0.11"
|
||||||
|
}
|
||||||
|
},
|
||||||
"on-finished": {
|
"on-finished": {
|
||||||
"version": "2.3.0",
|
"version": "2.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
|
||||||
|
@ -822,6 +982,15 @@
|
||||||
"mimic-fn": "^2.1.0"
|
"mimic-fn": "^2.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"optimist": {
|
||||||
|
"version": "0.6.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz",
|
||||||
|
"integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=",
|
||||||
|
"requires": {
|
||||||
|
"minimist": "~0.0.1",
|
||||||
|
"wordwrap": "~0.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"ora": {
|
"ora": {
|
||||||
"version": "4.0.2",
|
"version": "4.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/ora/-/ora-4.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/ora/-/ora-4.0.2.tgz",
|
||||||
|
@ -851,6 +1020,11 @@
|
||||||
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
|
||||||
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
|
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
|
||||||
},
|
},
|
||||||
|
"path-is-absolute": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||||
|
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
|
||||||
|
},
|
||||||
"path-to-regexp": {
|
"path-to-regexp": {
|
||||||
"version": "0.1.7",
|
"version": "0.1.7",
|
||||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
|
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
|
||||||
|
@ -874,6 +1048,14 @@
|
||||||
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
|
||||||
"integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M="
|
"integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M="
|
||||||
},
|
},
|
||||||
|
"promise": {
|
||||||
|
"version": "8.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/promise/-/promise-8.0.3.tgz",
|
||||||
|
"integrity": "sha512-HeRDUL1RJiLhyA0/grn+PTShlBAcLuh/1BJGtrvjwbvRDCTLLMEz9rOGCV+R3vHY4MixIuoMEd9Yq/XvsTPcjw==",
|
||||||
|
"requires": {
|
||||||
|
"asap": "~2.0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"proxy-addr": {
|
"proxy-addr": {
|
||||||
"version": "2.0.5",
|
"version": "2.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz",
|
||||||
|
@ -970,6 +1152,29 @@
|
||||||
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz",
|
||||||
"integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c="
|
"integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c="
|
||||||
},
|
},
|
||||||
|
"restler": {
|
||||||
|
"version": "3.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/restler/-/restler-3.4.0.tgz",
|
||||||
|
"integrity": "sha1-dB7As9FrlJ/uooE9DDxoUp6IjZs=",
|
||||||
|
"requires": {
|
||||||
|
"iconv-lite": "0.2.11",
|
||||||
|
"qs": "1.2.0",
|
||||||
|
"xml2js": "0.4.0",
|
||||||
|
"yaml": "0.2.3"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"iconv-lite": {
|
||||||
|
"version": "0.2.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.11.tgz",
|
||||||
|
"integrity": "sha1-HOYKOleGSiktEyH/RgnKS7llrcg="
|
||||||
|
},
|
||||||
|
"qs": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/qs/-/qs-1.2.0.tgz",
|
||||||
|
"integrity": "sha1-7Qeb4oaCFH5v2aNMwrDB4OxkU+4="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"restore-cursor": {
|
"restore-cursor": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",
|
||||||
|
@ -989,6 +1194,11 @@
|
||||||
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
||||||
},
|
},
|
||||||
|
"sax": {
|
||||||
|
"version": "0.5.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/sax/-/sax-0.5.8.tgz",
|
||||||
|
"integrity": "sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE="
|
||||||
|
},
|
||||||
"semver": {
|
"semver": {
|
||||||
"version": "5.7.1",
|
"version": "5.7.1",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||||
|
@ -1047,6 +1257,11 @@
|
||||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
|
||||||
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0="
|
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0="
|
||||||
},
|
},
|
||||||
|
"source-map": {
|
||||||
|
"version": "0.6.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||||
|
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
|
||||||
|
},
|
||||||
"statuses": {
|
"statuses": {
|
||||||
"version": "1.5.0",
|
"version": "1.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
|
||||||
|
@ -1119,6 +1334,16 @@
|
||||||
"mime-types": "~2.1.24"
|
"mime-types": "~2.1.24"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"uglify-js": {
|
||||||
|
"version": "3.6.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.8.tgz",
|
||||||
|
"integrity": "sha512-XhHJ3S3ZyMwP8kY1Gkugqx3CJh2C3O0y8NPiSxtm1tyD/pktLAkFZsFGpuNfTZddKDQ/bbDBLAd2YyA1pbi8HQ==",
|
||||||
|
"optional": true,
|
||||||
|
"requires": {
|
||||||
|
"commander": "~2.20.3",
|
||||||
|
"source-map": "~0.6.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"unpipe": {
|
"unpipe": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
||||||
|
@ -1156,6 +1381,11 @@
|
||||||
"defaults": "^1.0.3"
|
"defaults": "^1.0.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"wordwrap": {
|
||||||
|
"version": "0.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
|
||||||
|
"integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc="
|
||||||
|
},
|
||||||
"wrappy": {
|
"wrappy": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||||
|
@ -1174,6 +1404,20 @@
|
||||||
"resolved": "https://registry.npmjs.org/x-xss-protection/-/x-xss-protection-1.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/x-xss-protection/-/x-xss-protection-1.3.0.tgz",
|
||||||
"integrity": "sha512-kpyBI9TlVipZO4diReZMAHWtS0MMa/7Kgx8hwG/EuZLiA6sg4Ah/4TRdASHhRRN3boobzcYgFRUFSgHRge6Qhg=="
|
"integrity": "sha512-kpyBI9TlVipZO4diReZMAHWtS0MMa/7Kgx8hwG/EuZLiA6sg4Ah/4TRdASHhRRN3boobzcYgFRUFSgHRge6Qhg=="
|
||||||
},
|
},
|
||||||
|
"xml2js": {
|
||||||
|
"version": "0.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.0.tgz",
|
||||||
|
"integrity": "sha1-Ek/EEUtBKcgQgA7LKshs8lRiy5o=",
|
||||||
|
"requires": {
|
||||||
|
"sax": "0.5.x",
|
||||||
|
"xmlbuilder": ">=0.4.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"xmlbuilder": {
|
||||||
|
"version": "13.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-13.0.2.tgz",
|
||||||
|
"integrity": "sha512-Eux0i2QdDYKbdbA6AM6xE4m6ZTZr4G4xF9kahI2ukSEMCzwce2eX9WlTI5J3s+NU7hpasFsr8hWIONae7LluAQ=="
|
||||||
|
},
|
||||||
"xtend": {
|
"xtend": {
|
||||||
"version": "4.0.2",
|
"version": "4.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
|
||||||
|
@ -1184,10 +1428,15 @@
|
||||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
|
||||||
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
|
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
|
||||||
},
|
},
|
||||||
|
"yaml": {
|
||||||
|
"version": "0.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/yaml/-/yaml-0.2.3.tgz",
|
||||||
|
"integrity": "sha1-tUUOkudu82td0k42YAkeuu7z5cc="
|
||||||
|
},
|
||||||
"yiff": {
|
"yiff": {
|
||||||
"version": "1.2.1",
|
"version": "1.2.5",
|
||||||
"resolved": "https://registry.npmjs.org/yiff/-/yiff-1.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/yiff/-/yiff-1.2.5.tgz",
|
||||||
"integrity": "sha512-/5DiQdrCywqxQxX38HO08Wbs8rRzZRN4O217OKq6TEuTmOfmOYG1eC2G7TpmG/fi8Jk0X6fmaQ98wGzoM+KTwA==",
|
"integrity": "sha512-W/sRbqLJSfnyEfj8RdMLUpYihc/fipJ/jlUS3MMTTA6SIMfocZKJJS+G1MXVFKbTfOzMVeRKEPV9g7lDL949JA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"axios": "^0.19.0",
|
"axios": "^0.19.0",
|
||||||
"chalk": "^2.4.2"
|
"chalk": "^2.4.2"
|
||||||
|
|
54
package.json
54
package.json
|
@ -1,27 +1,31 @@
|
||||||
{
|
{
|
||||||
"name": "music-bot",
|
"name": "thaldrin",
|
||||||
"description": "A music bot",
|
"description": "A Random Image and Utility Bot",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"author": "ThatTonybo",
|
"author": "codepupper",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^0.19.0",
|
"axios": "^0.19.0",
|
||||||
"chalk": "^2.4.2",
|
"chalk": "^2.4.2",
|
||||||
"compression": "*",
|
"compression": "*",
|
||||||
"cors": "*",
|
"cors": "*",
|
||||||
"discord.js": "discordjs/discord.js",
|
"discord.js": "discordjs/discord.js",
|
||||||
"endb": "github:chroventer/endb",
|
"endb": "github:chroventer/endb",
|
||||||
"express": "*",
|
"express": "*",
|
||||||
"helmet": "*",
|
"express-handlebars": "^3.1.0",
|
||||||
"moment": "*",
|
"hastebin-gen": "^2.0.5",
|
||||||
"mongojs": "^2.6.0",
|
"helmet": "*",
|
||||||
"node-emoji": "^1.10.0",
|
"moment": "*",
|
||||||
"ora": "^4.0.2",
|
"mongojs": "^2.6.0",
|
||||||
"phin": "*",
|
"morgan": "^1.9.1",
|
||||||
"quick.db": "^7.0.0-b22",
|
"node-emoji": "^1.10.0",
|
||||||
"usage": "^0.7.1",
|
"ora": "^4.0.2",
|
||||||
"yiff": "^1.2.1"
|
"phin": "*",
|
||||||
}
|
"quick.db": "^7.0.0-b22",
|
||||||
|
"restler": "^3.4.0",
|
||||||
|
"usage": "^0.7.1",
|
||||||
|
"yiff": "^1.2.5"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
4
run.sh
4
run.sh
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/zsh
|
||||||
|
|
||||||
FILE=index
|
FILE=index
|
||||||
NODE=node
|
NODE=nodemon
|
||||||
|
|
||||||
while true;
|
while true;
|
||||||
do
|
do
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
const express = require('express');
|
|
||||||
const { hostname, port, authorization } = require('../config');
|
|
||||||
|
|
||||||
const helmet = require('helmet');
|
|
||||||
const compression = require('compression');
|
|
||||||
const cors = require('cors');
|
|
||||||
|
|
||||||
const app = express();
|
|
||||||
|
|
||||||
app.use(express.json());
|
|
||||||
app.use(express.urlencoded({ extended: true }));
|
|
||||||
app.use(helmet());
|
|
||||||
app.use(compression());
|
|
||||||
app.use(cors());
|
|
||||||
|
|
||||||
module.exports = (client) => {
|
|
||||||
app.get('/hello', async (req, res) => {
|
|
||||||
return res.send(`Hello world`);
|
|
||||||
});
|
|
||||||
|
|
||||||
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 for votes on 164.68.110.213:${port}`); }, (1000 * 3));
|
|
||||||
});
|
|
||||||
}
|
|
|
@ -1,63 +1,57 @@
|
||||||
const { Client, Collection } = require("discord.js");
|
const { Client, Collection } = require('discord.js');
|
||||||
const { readdirSync: read } = require("fs");
|
const { readdirSync: read } = require('fs');
|
||||||
|
|
||||||
const server = require("../../server/server");
|
const server = require('../../Dashboard/server');
|
||||||
|
|
||||||
module.exports = class Thaldrin extends Client {
|
module.exports = class Thaldrin extends Client {
|
||||||
constructor(config, shards) {
|
constructor(config, shards) {
|
||||||
super({
|
super({
|
||||||
disableEveryone: true,
|
disableEveryone: true,
|
||||||
disabledEvents: ["TYPING_START"],
|
disabledEvents: [ 'TYPING_START' ],
|
||||||
shardCount: shards,
|
shardCount: shards,
|
||||||
totalShardCount: shards
|
totalShardCount: shards
|
||||||
});
|
});
|
||||||
|
|
||||||
this.commands = new Collection();
|
this.commands = new Collection();
|
||||||
this.cooldowns = new Collection();
|
this.cooldowns = new Collection();
|
||||||
// this.queues = new Collection();
|
// this.queues = new Collection();
|
||||||
this.config = config;
|
this.config = config;
|
||||||
|
|
||||||
this.lastEval = null;
|
this.lastEval = null;
|
||||||
|
|
||||||
this.load();
|
this.login(config.token);
|
||||||
this.login(config.token);
|
this.load();
|
||||||
}
|
}
|
||||||
|
|
||||||
async load() {
|
async load() {
|
||||||
const events = await read("./DiscordEvents");
|
const events = await read('./DiscordEvents');
|
||||||
const modules = await read("./DiscordModules");
|
const modules = await read('./DiscordModules');
|
||||||
|
|
||||||
// server(this)
|
server(this);
|
||||||
|
|
||||||
events
|
events.filter((f) => f.endsWith('.js')).forEach((file) => {
|
||||||
.filter(f => f.endsWith(".js"))
|
try {
|
||||||
.forEach(file => {
|
const event = require(`../../DiscordEvents/${file}`);
|
||||||
try {
|
|
||||||
const event = require(`../../DiscordEvents/${file}`);
|
|
||||||
|
|
||||||
this.on(event.name, event.run.bind(null, this));
|
this.on(event.name, event.run.bind(null, this));
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
modules
|
modules.filter((f) => !f.endsWith('.js')).forEach(async (module) => {
|
||||||
.filter(f => !f.endsWith(".js"))
|
const commands = await read(`./DiscordModules/${module}`);
|
||||||
.forEach(async module => {
|
|
||||||
const commands = await read(`./DiscordModules/${module}`);
|
|
||||||
|
|
||||||
commands
|
commands.filter((f) => f.endsWith('.js')).forEach((command) => {
|
||||||
.filter(f => f.endsWith(".js"))
|
try {
|
||||||
.forEach(command => {
|
const file = require(`../../DiscordModules/${module}/${command}`);
|
||||||
try {
|
const Command = new file();
|
||||||
const file = require(`../../DiscordModules/${module}/${command}`);
|
|
||||||
const Command = new file();
|
|
||||||
|
|
||||||
this.commands.set(Command.name, Command);
|
this.commands.set(Command.name, Command);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
module.exports = class Command {
|
module.exports = class Command {
|
||||||
constructor(command) {
|
constructor(command) {
|
||||||
this.name = command.name || '';
|
this.name = command.name || '';
|
||||||
this.description = command.description || '';
|
this.description = command.description || '';
|
||||||
this.aliases = command.aliases || [];
|
this.aliases = command.aliases || [];
|
||||||
this.module = command.module || '';
|
this.module = command.module || '';
|
||||||
this.cooldown = command.cooldown || 0;
|
this.cooldown = command.cooldown || 0;
|
||||||
this.guildOnly = command.guildOnly || false;
|
this.guildOnly = command.guildOnly || false;
|
||||||
this.developerOnly = command.developerOnly || false;
|
this.developerOnly = command.developerOnly || false;
|
||||||
}
|
this.nsfw = command.nsfw || false;
|
||||||
}
|
this.AuthorPermissions = command.AuthorPermissions || 'NONE';
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
|
@ -1,11 +1,16 @@
|
||||||
|
const { Permissions: { FLAGS } } = require('discord.js');
|
||||||
module.exports = {
|
module.exports = {
|
||||||
format: require("./src/format"),
|
format: require('./src/format'),
|
||||||
status: require("./src/statuses"),
|
status: require('./src/statuses'),
|
||||||
calc: require("./src/calc"),
|
calc: require('./src/calc'),
|
||||||
ShortLinks: require("./src/shortlinks"),
|
ShortLinks: require('./src/shortlinks'),
|
||||||
SourceFynnder: require("./src/sourceFynnder"),
|
SourceFynnder: require('./src/sourceFynnder'),
|
||||||
emotes: require("./src/emotes"),
|
emotes: require('./src/emotes'),
|
||||||
db: require("./src/database"),
|
db: require('./src/database'),
|
||||||
log: require("./src/logs"),
|
log: require('./src/logs'),
|
||||||
discord: require("discord.js")
|
int: require('./src/interactions'),
|
||||||
|
//eco: require('./src/economy'),
|
||||||
|
discord: require('discord.js'),
|
||||||
|
yiff: require('yiff'),
|
||||||
|
perms: FLAGS
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,112 +1,136 @@
|
||||||
const db = require("quick.db");
|
const db = require('quick.db');
|
||||||
const Servers = new db.table("servers");
|
const Servers = new db.table('servers');
|
||||||
const Users = new db.table("users");
|
const Users = new db.table('users');
|
||||||
const { prefixes } = require("../../config");
|
//const { prefixes } = require('../../config');
|
||||||
const chalk = require("chalk");
|
const chalk = require('chalk');
|
||||||
const e = require("node-emoji");
|
const e = require('node-emoji');
|
||||||
|
|
||||||
const DatabaseDefaults = {
|
const DatabaseDefaults = {
|
||||||
user: {
|
user: {
|
||||||
id: null,
|
id: null,
|
||||||
blacklist: {
|
blacklist: {
|
||||||
state: false,
|
state: false,
|
||||||
replied: false,
|
replied: false,
|
||||||
reason: undefined
|
reason: undefined
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
server: {
|
server: {
|
||||||
prefix: prefixes,
|
prefix: [],
|
||||||
SourceFynnder: false,
|
SourceFynnder: false,
|
||||||
Shortlinks: false,
|
Shortlinks: false,
|
||||||
embeds: true,
|
embeds: true,
|
||||||
rp_text: true,
|
rp_text: true,
|
||||||
default_yiff: "gay"
|
default_yiff: 'gay'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
defaults: DatabaseDefaults,
|
defaults: DatabaseDefaults,
|
||||||
setupServer: async function(ctx) {
|
setupServer: async function(ctx) {
|
||||||
ctx.utils.log.servers.setup(ctx.guild);
|
ctx.utils.log.servers.setup(ctx.guild);
|
||||||
await Servers.set(ctx.guild.id, DatabaseDefaults.server);
|
await Servers.set(ctx.guild.id, DatabaseDefaults.server);
|
||||||
ctx.utils.log.servers.fin(ctx.guild);
|
ctx.utils.log.servers.fin(ctx.guild);
|
||||||
return;
|
return;
|
||||||
},
|
},
|
||||||
prefix: {
|
prefix: {
|
||||||
add: async function(ctx) {
|
add: async function(ctx, Prefix) {
|
||||||
let Prefixes = [];
|
let Prefixes = [];
|
||||||
let New;
|
let New;
|
||||||
Prefixes = await Servers.get(ctx.guild.id).prefix;
|
Prefixes = await Servers.get(ctx.guild.id).prefix;
|
||||||
|
|
||||||
if (Prefixes.includes(ctx.args.join(" ")))
|
if (Prefixes.includes(Prefix)) throw new Error('Prefix already in Database');
|
||||||
throw new Error("Prefix already in Database");
|
else {
|
||||||
else {
|
New = await Servers.push(`${ctx.guild.id}.prefix`, Prefix);
|
||||||
New = await Servers.push(`${ctx.guild.id}.prefix`, ctx.args.join(" "));
|
}
|
||||||
}
|
return New;
|
||||||
return New;
|
},
|
||||||
},
|
remove: async function(ctx, Prefix) {
|
||||||
remove: async function(ctx) {
|
if (prefixes.includes(Prefix)) {
|
||||||
if (require("../../config").prefixes.includes(ctx.args.join(" "))) {
|
throw new Error('You cannot remove the Default Prefix(es)');
|
||||||
throw new Error("You cannot remove the Default Prefix(es)");
|
}
|
||||||
}
|
let Prefixes = ctx.db.servers.get(ctx.guild.id).prefix;
|
||||||
|
|
||||||
let Prefixes = Servers.get(`${ctx.guild.id}.prefix`);
|
if (!Prefixes.includes(Prefix)) {
|
||||||
let New;
|
throw new Error('Prefix does not exist in Database');
|
||||||
|
}
|
||||||
|
|
||||||
for (let i in Prefixes) {
|
let index = Prefixes.indexOf(Prefix);
|
||||||
console.log(
|
Prefixes.splice(index, 1);
|
||||||
`[${i}] [${Prefixes.toString().replace(
|
await Servers.set(`${ctx.guild.id}.prefix`, Prefixes);
|
||||||
Prefixes[i],
|
}
|
||||||
chalk.red(Prefixes[i])
|
},
|
||||||
)}]`
|
toggle: {
|
||||||
);
|
SourceFynnder: async function(ctx) {
|
||||||
if (Prefixes[i] === ctx.args.join(" ")) {
|
let Server = await Servers.get(ctx.guild.id);
|
||||||
New = Prefixes.slice(i, 1);
|
Server.SourceFynnder
|
||||||
console.log(Prefixes.slice(i, 1));
|
? console.log(
|
||||||
console.log(New);
|
`${chalk.green('✔')} Set ${chalk.blue('SourceFynnder')} in ${chalk.magenta(
|
||||||
i--;
|
ctx.guild.id
|
||||||
return console.log("Found it");
|
)} to ${chalk.red('false')} `
|
||||||
}
|
)
|
||||||
}
|
: console.log(
|
||||||
//return New;
|
`${chalk.green('✔')} Set ${chalk.blue('SourceFynnder')} in ${chalk.magenta(
|
||||||
}
|
ctx.guild.id
|
||||||
},
|
)} to ${chalk.green('true')} `
|
||||||
toggle: {
|
);
|
||||||
SourceFynnder: async function(ctx) {
|
|
||||||
let Server = await Servers.get(ctx.guild.id);
|
|
||||||
Server.SourceFynnder
|
|
||||||
? console.log(
|
|
||||||
`${chalk.green("✔")} Set ${chalk.blue(
|
|
||||||
"SourceFynnder"
|
|
||||||
)} in ${chalk.magenta(ctx.guild.id)} to ${chalk.red("false")} `
|
|
||||||
)
|
|
||||||
: console.log(
|
|
||||||
`${chalk.green("✔")} Set ${chalk.blue(
|
|
||||||
"SourceFynnder"
|
|
||||||
)} in ${chalk.magenta(ctx.guild.id)} to ${chalk.green("true")} `
|
|
||||||
);
|
|
||||||
|
|
||||||
Server.SourceFynnder
|
Server.SourceFynnder
|
||||||
? await Servers.set(`${ctx.guild.id}.SourceFynnder`, false)
|
? await Servers.set(`${ctx.guild.id}.SourceFynnder`, false)
|
||||||
: await Servers.set(`${ctx.guild.id}.SourceFynnder`, true);
|
: await Servers.set(`${ctx.guild.id}.SourceFynnder`, true);
|
||||||
},
|
},
|
||||||
Shortlinks: async function(ctx) {
|
Shortlinks: async function(ctx) {
|
||||||
let Server = await Servers.get(ctx.guild.id);
|
let Server = await Servers.get(ctx.guild.id);
|
||||||
Server.Shortlinks
|
Server.Shortlinks
|
||||||
? console.log(
|
? console.log(
|
||||||
`${chalk.green("✔")} Set ${chalk.blue(
|
`${chalk.green('✔')} Set ${chalk.blue('Shortlinks')} in ${chalk.magenta(
|
||||||
"Shortlinks"
|
ctx.guild.id
|
||||||
)} in ${chalk.magenta(ctx.guild.id)} to ${chalk.red("false")} `
|
)} to ${chalk.red('false')} `
|
||||||
)
|
)
|
||||||
: console.log(
|
: console.log(
|
||||||
`${chalk.green("✔")} Set ${chalk.blue(
|
`${chalk.green('✔')} Set ${chalk.blue('Shortlinks')} in ${chalk.magenta(
|
||||||
"Shortlinks"
|
ctx.guild.id
|
||||||
)} in ${chalk.magenta(ctx.guild.id)} to ${chalk.green("true")} `
|
)} to ${chalk.green('true')} `
|
||||||
);
|
);
|
||||||
|
|
||||||
Server.Shortlinks
|
Server.Shortlinks
|
||||||
? await Servers.set(`${ctx.guild.id}.Shortlinks`, false)
|
? await Servers.set(`${ctx.guild.id}.Shortlinks`, false)
|
||||||
: await Servers.set(`${ctx.guild.id}.Shortlinks`, true);
|
: await Servers.set(`${ctx.guild.id}.Shortlinks`, true);
|
||||||
}
|
},
|
||||||
}
|
Embeds: async function(ctx) {
|
||||||
|
let Server = await Servers.get(ctx.guild.id);
|
||||||
|
Server.embeds
|
||||||
|
? console.log(
|
||||||
|
`${chalk.green('✔')} Set ${chalk.blue('Emdeds')} in ${chalk.magenta(ctx.guild.id)} to ${chalk.red(
|
||||||
|
'false'
|
||||||
|
)} `
|
||||||
|
)
|
||||||
|
: console.log(
|
||||||
|
`${chalk.green('✔')} Set ${chalk.blue('Embeds')} in ${chalk.magenta(
|
||||||
|
ctx.guild.id
|
||||||
|
)} to ${chalk.green('true')} `
|
||||||
|
);
|
||||||
|
|
||||||
|
Server.embeds
|
||||||
|
? await Servers.set(`${ctx.guild.id}.embeds`, false)
|
||||||
|
: await Servers.set(`${ctx.guild.id}.embeds`, true);
|
||||||
|
},
|
||||||
|
Text: async function(ctx) {
|
||||||
|
let Server = await Servers.get(ctx.guild.id);
|
||||||
|
Server.rp_text
|
||||||
|
? console.log(
|
||||||
|
`${chalk.green('✔')} Set ${chalk.blue('RP Text')} in ${chalk.magenta(
|
||||||
|
ctx.guild.id
|
||||||
|
)} to ${chalk.red('false')} `
|
||||||
|
)
|
||||||
|
: console.log(
|
||||||
|
`${chalk.green('✔')} Set ${chalk.blue('RP Text')} in ${chalk.magenta(
|
||||||
|
ctx.guild.id
|
||||||
|
)} to ${chalk.green('true')} `
|
||||||
|
);
|
||||||
|
|
||||||
|
Server.rp_text
|
||||||
|
? await Servers.set(`${ctx.guild.id}.rp_text`, false)
|
||||||
|
: await Servers.set(`${ctx.guild.id}.rp_text`, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
15
utils/src/economy.js
Normal file
15
utils/src/economy.js
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
const { table } = require('quick.db');
|
||||||
|
const Servers = new table('servers');
|
||||||
|
const Users = new table('users');
|
||||||
|
const Backend = new table('backend');
|
||||||
|
let T = '-x-';
|
||||||
|
let Message = {};
|
||||||
|
let hasVoted = false;
|
||||||
|
let NormalAmout = 5;
|
||||||
|
|
||||||
|
async function CalculateFromMessage(ctx) {
|
||||||
|
Message.content = ctx.msg.content;
|
||||||
|
Message.length = ctx.msg.content.length;
|
||||||
|
|
||||||
|
console.log();
|
||||||
|
}
|
|
@ -1,41 +1,76 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
status: {
|
status: {
|
||||||
online: "<:oxONLINE:480145455708110850>",
|
online: '<:oxONLINE:480145455708110850> Online',
|
||||||
streaming: "<:oxSTREAMING:487933554894962688>",
|
streaming: '<:oxSTREAMING:487933554894962688> Streaming',
|
||||||
idle: "<:oxIDLE:480145455183953921>",
|
idle: '<:oxIDLE:480145455183953921> Idle',
|
||||||
dnd: "<:oxDND:480145455104262165>",
|
dnd: '<:oxDND:480145455104262165> Do not Disturb',
|
||||||
offline: "<:oxOFFLINE:480145455330754571>"
|
offline: '<:oxOFFLINE:480145455330754571> Offline'
|
||||||
},
|
},
|
||||||
|
MemberStatus: {
|
||||||
|
online: '<:oxONLINE:480145455708110850>: ',
|
||||||
|
streaming: '<:oxSTREAMING:487933554894962688>: ',
|
||||||
|
idle: '<:oxIDLE:480145455183953921>: ',
|
||||||
|
dnd: '<:oxDND:480145455104262165>: ',
|
||||||
|
offline: '<:oxOFFLINE:480145455330754571>: '
|
||||||
|
},
|
||||||
|
|
||||||
social: {
|
social: {
|
||||||
twitter: "<:twitter:517392526622064640>",
|
twitter: '<:twitter:517392526622064640>',
|
||||||
patreon: "<:patreon:465243291877900300>",
|
patreon: '<:patreon:465243291877900300>',
|
||||||
github: "<:github:487283925417459732>",
|
github: '<:github:487283925417459732>',
|
||||||
trello: "<:trello:526452412244951041>",
|
trello: '<:trello:526452412244951041>',
|
||||||
discord: "<:discord:517392526647361557>"
|
discord: '<:discord:517392526647361557>'
|
||||||
},
|
},
|
||||||
|
|
||||||
settings: {
|
settings: {
|
||||||
cog: "<:settings:350172481157464064>",
|
cog: '<:settings:350172481157464064>',
|
||||||
on: "<:thalYes:444843380187332608>",
|
on: '<:thalYes:444843380187332608>',
|
||||||
off: "<:thalNo:447651589902041102> ",
|
off: '<:thalNo:447651589902041102> ',
|
||||||
locked: "<:locked:350172480318603265>",
|
locked: '<:locked:350172480318603265>',
|
||||||
unlocked: "<:unlocked:350172481664974848>",
|
unlocked: '<:unlocked:350172481664974848>',
|
||||||
save: "<:save:350172480821919745>",
|
save: '<:save:350172480821919745>',
|
||||||
trash: "<:trash:350172481794998273>"
|
trash: '<:trash:350172481794998273>'
|
||||||
},
|
},
|
||||||
|
|
||||||
eval: {
|
eval: {
|
||||||
working: "<:success:350172481186955267>",
|
working: '<:success:350172481186955267>',
|
||||||
warning: "<:warning:350172481757118478>",
|
warning: '<:warning:350172481757118478>',
|
||||||
error: "<:error:350172479936921611>"
|
error: '<:error:350172479936921611>'
|
||||||
},
|
},
|
||||||
|
|
||||||
perms: {
|
perms: {
|
||||||
auth: "<:authorization:350172478019993614>"
|
auth: '<:authorization:350172478019993614>'
|
||||||
},
|
},
|
||||||
|
features: {
|
||||||
random: {
|
commerce: '<:StoreChannel:640333912442404864> Store',
|
||||||
pin: "<:pin:350172480725581838>"
|
news: '<:NewsChannel:640333912417239050> News',
|
||||||
}
|
public: ':globe_with_meridians: Public',
|
||||||
|
invite_splash: ':frame_photo: Invite Splash',
|
||||||
|
animated_icon: 'Animated Icon',
|
||||||
|
banner: 'Banner',
|
||||||
|
vanity_url: ':link: Vanity URL'
|
||||||
|
},
|
||||||
|
regions: {
|
||||||
|
'us-east': ':flag_us: US East',
|
||||||
|
'us-south': ':flag_us: US South',
|
||||||
|
'us-central': ':flag_us: US Central',
|
||||||
|
singapore: ':flag_sg: Singapore',
|
||||||
|
sydney: ':flag_au: Sydney',
|
||||||
|
southafrika: 'South Afrika',
|
||||||
|
kongkong: ':flag_hk: Hong Kong',
|
||||||
|
brazil: ':flag_br: Brazil',
|
||||||
|
amsterdam: ':flag_nl: Amsterdam',
|
||||||
|
japan: ':flag_jp: Japan',
|
||||||
|
london: ':flag_gb: London',
|
||||||
|
india: ':flag_in: India',
|
||||||
|
europe: ':flag_eu: Europe',
|
||||||
|
'eu-west': ':flag_eu: Europe West',
|
||||||
|
'eu-central': ':flag_eu: Europe Central',
|
||||||
|
russia: ':flag_ru: Russia',
|
||||||
|
frankfurt: ':flag_de: Frankfurt',
|
||||||
|
dubai: 'Dubai'
|
||||||
|
},
|
||||||
|
random: {
|
||||||
|
pin: '<:pin:350172480725581838>'
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
bold: function(str) {
|
bold: function(str) {
|
||||||
return `**${str}**`;
|
return `**${str}**`;
|
||||||
},
|
},
|
||||||
italic: function(str) {
|
italic: function(str) {
|
||||||
return `*${str}*`;
|
return `*${str}*`;
|
||||||
}
|
},
|
||||||
|
code: function(str) {
|
||||||
|
return `\`${str}\``;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
59
utils/src/interactions.js
Normal file
59
utils/src/interactions.js
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
const hug = [
|
||||||
|
'0 hugs 1',
|
||||||
|
'1 gets a tight hug from 0',
|
||||||
|
'1 is getting a hug from 0',
|
||||||
|
'Is 0 hugging 1? They sure are!',
|
||||||
|
'0 hugs 1 in a lovable way',
|
||||||
|
'0 hugs 1 with a very warm smile',
|
||||||
|
'0 hugs 1 in an attempt to cheer them up',
|
||||||
|
'0 sneaks up behind 1 and gives him/her a surprise hug!',
|
||||||
|
'0 lunges at 1, wrapping his/her arms around lovingly!',
|
||||||
|
"1 wasn't suspecting anything at first, but then suddenly 0 appears and hugs him/her!",
|
||||||
|
'0 blushes a little bit, carefully approaching 1 and giving him/her a tender hug.',
|
||||||
|
'0 suddenly yells out loud; "Tactical hug incoming!".',
|
||||||
|
'0 lifts 1 from the ground and hugs them tightly.',
|
||||||
|
|
||||||
|
'0 and 1 run towards eachother, arms open, not unlike the classic grassy-field-reunion scene. They meet in the middle with a strong embrace.',
|
||||||
|
'0 scoots closer over to 1 on a park bench, then wraps his/her arms around the unsuspecting hug victim.',
|
||||||
|
'0 confidently steps forward, giving 1 a tight hug.',
|
||||||
|
"0 gives 1 a big ol' hug.",
|
||||||
|
'1 is suddenly hugged by 0!'
|
||||||
|
];
|
||||||
|
const kiss = [
|
||||||
|
'0 kisses 1',
|
||||||
|
'0 gives 1 a kiss',
|
||||||
|
'1 gets a surprise kiss from 0',
|
||||||
|
'0 appears to be kissing 1. Lets leave them to it :3'
|
||||||
|
];
|
||||||
|
const boop = [ '0 boops 1', "0 boops 1's Snoot", "1's Snoot got booped by 0", '0 nuzzles 1 and boops their Snoot' ];
|
||||||
|
|
||||||
|
const cuddle = [ '0 cuddles 1', '0 cuddles 1 lovingly', '0 has 1 in their lap and cuddles them lovingly' ];
|
||||||
|
|
||||||
|
const lick = [
|
||||||
|
'0 licked 1 to the point where he/she murrred/purred',
|
||||||
|
'0 licked 1 in the name of love. Murr!',
|
||||||
|
'0 was feeling a little playful and decided to lick 1',
|
||||||
|
'0 slides over to 1 and licks them',
|
||||||
|
'0 nibbles and licks 1 playfully',
|
||||||
|
'0 slides over to 1 and licks and cuddles 1'
|
||||||
|
];
|
||||||
|
|
||||||
|
const hold = [ '0 holds 1', '0 holds 1 tight' ];
|
||||||
|
|
||||||
|
const bulge = [ "0 eyes 1's bulge", "0 likes to see 1's bulge~" ];
|
||||||
|
|
||||||
|
const suck = [ "0 sucks 1's cock with hungry eyes~", '1 lets 0 suck their cock~' ];
|
||||||
|
|
||||||
|
const bang = [ '0 bangs 1', '1 moans as 0 bangs them', '1 moans loudly as 0 bangs them hard~' ];
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
hug,
|
||||||
|
kiss,
|
||||||
|
boop,
|
||||||
|
cuddle,
|
||||||
|
lick,
|
||||||
|
hold,
|
||||||
|
bulge,
|
||||||
|
suck,
|
||||||
|
bang
|
||||||
|
};
|
|
@ -1,54 +1,77 @@
|
||||||
const ShortLinkReg = /(?:\s|^)(gh|gl|gd|owo|sg|ttv|teknik|bb|yt|bc|bcu|sc|aur|bot|sw|tw|npm|xkcd)\/([a-zA-Z0-9-_.#/!]*)/g;
|
const ShortLinkReg = /(?:\s|^)(gh|gl|gd|owo|sg|ttv|teknik|bb|yt|bc|bcu|sc|aur|bot|sw|tw|npm|xkcd)\/([a-zA-Z0-9-_.#/!]*)/g;
|
||||||
const ShortLinks = {
|
const ShortLinks = {
|
||||||
gh: "https://github.com/$link$",
|
gh: 'https://github.com/$link$',
|
||||||
gl: "https://gitlab.com/$link$",
|
gl: 'https://gitlab.com/$link$',
|
||||||
yt: "https://youtu.be/$link$",
|
yt: 'https://youtu.be/$link$',
|
||||||
tw: "https://twitter.com/$link$",
|
tw: 'https://twitter.com/$link$',
|
||||||
npm: "https://npmjs.com/package/$link$",
|
npm: 'https://npm.im/$link$',
|
||||||
ttv: "https://twitch.tv/$link$",
|
ttv: 'https://twitch.tv/$link$',
|
||||||
gd: "https://gitdab.com/$link$",
|
gd: 'https://gitdab.com/$link$',
|
||||||
owo: "https://owo.codes/$link$",
|
owo: 'https://owo.codes/$link$',
|
||||||
sg: "https://git.supernets.org/$link$",
|
sg: 'https://git.supernets.org/$link$',
|
||||||
teknik: "https://git.teknik.io/$link$",
|
teknik: 'https://git.teknik.io/$link$',
|
||||||
bb: "https://bitbucket.org/$link$",
|
bb: 'https://bitbucket.org/$link$',
|
||||||
bc: "https://$link$.bandcamp.com/",
|
bc: 'https://$link$.bandcamp.com/',
|
||||||
bcu: "https://bandcamp.com/$link$",
|
bcu: 'https://bandcamp.com/$link$',
|
||||||
sc: "https://soundcloud.com/$link$",
|
sc: 'https://soundcloud.com/$link$',
|
||||||
aur: "https://aur.archlinux.org/packages/$link$",
|
aur: 'https://aur.archlinux.org/packages/$link$',
|
||||||
sw: "https://steamcommunity.com/sharedfiles/filedetails/?id=$link$",
|
sw: 'https://steamcommunity.com/sharedfiles/filedetails/?id=$link$',
|
||||||
bot: "<https://discordapp.com/oauth2/authorize?client_id=$link$&scope=bot>",
|
bot: '<https://discordapp.com/oauth2/authorize?client_id=$link$&scope=bot>',
|
||||||
xkcd: "https://xkcd.com/$link$"
|
xkcd: 'https://xkcd.com/$link$'
|
||||||
};
|
};
|
||||||
|
const ShortLinkDirs = {
|
||||||
module.exports = function Shortlink(enabled, msg) {
|
gh: 'Github',
|
||||||
if (!enabled || enabled === null || enabled === undefined) return;
|
gl: 'Gitlab',
|
||||||
let res = msg.content.match(ShortLinkReg);
|
gd: 'Gitdab',
|
||||||
if (!res) return;
|
yt: 'Youtube',
|
||||||
res = res.map(x => (x.startsWith(" ") ? x.substring(1) : x));
|
tw: 'Twitter',
|
||||||
let links = [];
|
npm: 'NPM',
|
||||||
|
ttv: 'TwitchTv',
|
||||||
for (const m in res) {
|
owo: 'owo_codes',
|
||||||
for (const x in ShortLinks) {
|
sg: 'Supernets_Git',
|
||||||
let url = res[m];
|
teknik: 'Teknik_Git',
|
||||||
if (!url.startsWith(x)) continue;
|
bb: 'BitBucket',
|
||||||
url = url.replace(x + "/", "");
|
bc: 'Bandcamp_Band',
|
||||||
|
bcu: 'Bandcamp_User',
|
||||||
if (x == "gh" || x == "gl" || x == "gd") {
|
sc: 'Soundcloud',
|
||||||
url = url.replace("#", "/issues/");
|
aur: 'Arch_Packages',
|
||||||
}
|
sw: 'Steam_Workshop',
|
||||||
|
bot: 'Discord_Bot_Invite',
|
||||||
if (x == "gl") {
|
xkcd: 'xkcd'
|
||||||
url = url.replace("!", "/merge_requests/");
|
};
|
||||||
} else if (x == "gd") {
|
const db = require('quick.db');
|
||||||
url = url.replace("!", "/pulls/");
|
const backend = new db.table('backend');
|
||||||
} else if (x == "gh") {
|
module.exports = async function Shortlink(enabled, msg) {
|
||||||
url = url.replace("!", "/pull/");
|
if (!enabled || enabled === null || enabled === undefined) return;
|
||||||
}
|
let res = msg.content.match(ShortLinkReg);
|
||||||
|
if (!res) return;
|
||||||
url = ShortLinks[x].replace("$link$", url);
|
res = res.map((x) => (x.startsWith(' ') ? x.substring(1) : x));
|
||||||
links.push(url);
|
let links = [];
|
||||||
}
|
let Amount = [];
|
||||||
}
|
|
||||||
|
for (const m in res) {
|
||||||
msg.channel.send(links.join("\n"));
|
for (const x in ShortLinks) {
|
||||||
|
let url = res[m];
|
||||||
|
if (!url.startsWith(x)) continue;
|
||||||
|
url = url.replace(x + '/', '');
|
||||||
|
|
||||||
|
if (x == 'gh' || x == 'gl' || x == 'gd') {
|
||||||
|
url = url.replace('#', '/issues/');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (x == 'gl') {
|
||||||
|
url = url.replace('!', '/merge_requests/');
|
||||||
|
} else if (x == 'gd') {
|
||||||
|
url = url.replace('!', '/pulls/');
|
||||||
|
} else if (x == 'gh') {
|
||||||
|
url = url.replace('!', '/pull/');
|
||||||
|
}
|
||||||
|
|
||||||
|
url = ShortLinks[x].replace('$link$', url);
|
||||||
|
links.push(url);
|
||||||
|
await backend.add(`Shortlink.${ShortLinkDirs[x]}`, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
msg.channel.send(links.join('\n'));
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,39 +1,41 @@
|
||||||
const axios = require("axios");
|
const axios = require('axios');
|
||||||
const db = require("quick.db");
|
const db = require('quick.db');
|
||||||
const backend = new db.table("backend");
|
const backend = new db.table('backend');
|
||||||
|
const Servers = new db.table('servers');
|
||||||
let md5 = new RegExp(
|
let md5 = new RegExp(
|
||||||
"((?:!)?https?://static[0-9]*.(?:e621|e926).net/data/(?:sample/|preview/|)[0-9a-f]{2}/[0-9a-f]{2}/([0-9a-f]{32}).([0-9a-z]+))",
|
'((?:!)?https?://static[0-9]*.(?:e621|e926).net/data/(?:sample/|preview/|)[0-9a-f]{2}/[0-9a-f]{2}/([0-9a-f]{32}).([0-9a-z]+))',
|
||||||
"igm"
|
'igm'
|
||||||
);
|
);
|
||||||
|
|
||||||
let search_md5 = "https://e621.net/post/show.json?md5=";
|
let search_md5 = 'https://e621.net/post/show.json?md5=';
|
||||||
let e6 = "https://e621.net/post/show/";
|
let e6 = 'https://e621.net/post/show/';
|
||||||
let e9 = "https://e926.net/post/show/";
|
let e9 = 'https://e926.net/post/show/';
|
||||||
|
|
||||||
const version = "0.1.0";
|
const version = '0.1.0';
|
||||||
|
|
||||||
module.exports = async function SourceFynnder(enabled, msg) {
|
module.exports = async function SourceFynnder(enabled, msg) {
|
||||||
if (!enabled || enabled === null || enabled === undefined) return;
|
if (!enabled || enabled === null || enabled === undefined) return;
|
||||||
res = msg.content.match(md5);
|
res = msg.content.match(md5);
|
||||||
if (!res) return;
|
if (!res) return;
|
||||||
|
|
||||||
let Sources = [];
|
let Sources = [];
|
||||||
for (const m in res) {
|
for (const m in res) {
|
||||||
let URL = res[m];
|
let URL = res[m];
|
||||||
let hash = URL.split(md5)[2];
|
let hash = URL.split(md5)[2];
|
||||||
|
|
||||||
let { data } = await axios.get(search_md5 + hash, {
|
let { data } = await axios.get(search_md5 + hash, {
|
||||||
headers: { "user-agent": `SourceFynnder/${version} (ry / codepupper)` }
|
headers: { 'user-agent': `SourceFynnder/${version} (ry / codepupper)` }
|
||||||
});
|
});
|
||||||
if (data.rating === "s") {
|
if (data.rating === 's') {
|
||||||
Source = e9 + data.id;
|
Source = e9 + data.id;
|
||||||
} else {
|
} else {
|
||||||
Source = e6 + data.id;
|
Source = e6 + data.id;
|
||||||
}
|
}
|
||||||
Sources.push(`:link::mag: ${Source}`);
|
Sources.push(`:link::mag: ${Source}`);
|
||||||
}
|
}
|
||||||
await backend.add("SourceFynnder.found", Sources.length);
|
msg.channel.send(Sources);
|
||||||
msg.channel.send(Sources);
|
await backend.add('SourceFynnder.found', Sources.length);
|
||||||
|
await Servers.add(`${msg.guild.id}.foundSources`, Sources.length);
|
||||||
};
|
};
|
||||||
/* url = msg.content.split(md5);
|
/* url = msg.content.split(md5);
|
||||||
hash = url[2];
|
hash = url[2];
|
||||||
|
|
23
views/index.hbs
Normal file
23
views/index.hbs
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<body class="wrapper">
|
||||||
|
<div id="main">
|
||||||
|
|
||||||
|
<div class="center">
|
||||||
|
<img src="/assets/images/icon.png" alt="Thaldrin's Icon" class="icon"><h1 class="title rainbow_text_animated" id="title">{{title}}</h1>
|
||||||
|
<span class="subtitle">{{subtitle}}<br></span>
|
||||||
|
<divide></divide>
|
||||||
|
<span><button class="source"><a href="{{bot.source}}" target="_blank"><i>Source code</i></a></button></span>
|
||||||
|
<span><button class="invite"><a href="{{bot.invite}}" target="_blank"><i>Invite Me!</i></a></button></span>
|
||||||
|
<span><button class="support"><a href="{{bot.support}}" target="_blank"><i>Support Server</i></a></button></span>
|
||||||
|
<divide><divide/>
|
||||||
|
<div class="Stats">
|
||||||
|
<span id="messages">Channels - {{bot.channels}}</span><br>
|
||||||
|
<span id="servers">Servers - {{bot.guilds}}</span><br>
|
||||||
|
<span id="users">Users - {{bot.users}}</span><br>
|
||||||
|
<span id="commands">Commands - {{bot.commands}}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
43
views/layouts/main.hbs
Normal file
43
views/layouts/main.hbs
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="initial-scale=1.0">
|
||||||
|
<meta http-equiv="X-UA-Compatible">
|
||||||
|
<title>{{title}} | {{subtitle}}</title>
|
||||||
|
{{!-- <script src="../assets/js/main.js" async defer></script> --}}
|
||||||
|
<link rel="stylesheet" type="text/css" href="./assets/css/main.css" />
|
||||||
|
<link href="https://afeld.github.io/emoji-css/emoji.css" rel="stylesheet">
|
||||||
|
|
||||||
|
{{!--
|
||||||
|
<link rel="manifest" href="./assets/json/manifest.json">
|
||||||
|
<script type="text/javascript" src="./assets/js/dropdown.js"></script> --}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<meta name="theme-color" content="#e4778d">
|
||||||
|
<meta property="og:title" content="Foxy">
|
||||||
|
<meta property="og:type" content="website">
|
||||||
|
<meta property="og:url" content="https://fk.ci">
|
||||||
|
{{!-- <meta property="og:image"
|
||||||
|
content="https://raw.githubusercontent.com/EndlessHosting/assets/master/images/PFPs/code.png">
|
||||||
|
--}} <meta property="og:description" content="This is a Link shortener for commish.me!">
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="icon" type="image/png"
|
||||||
|
href="/assets/images/icon.png" sizes="32x32">
|
||||||
|
<link rel="icon" type="image/png"
|
||||||
|
href="/assets/images/icon.png" sizes="96x96">
|
||||||
|
<link rel="apple-touch-icon" sizes="180x180"
|
||||||
|
href="/assets/images/icon.png">
|
||||||
|
<meta name="msapplication-TileColor" content="#ffffff">
|
||||||
|
<meta name="msapplication-TileImage" content="/mstile-144x144.png">
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
{{{body}}}
|
||||||
|
</body>
|
||||||
|
|
||||||
|
|
||||||
|
</html>
|
Loading…
Reference in a new issue