forked from embee/woomy
synced changes
This commit is contained in:
parent
9be16b793e
commit
652b03136e
9 changed files with 215 additions and 27 deletions
|
@ -4,6 +4,7 @@
|
||||||
"description": "Woomy is a all-purpose discord bot built off the guidebot base and coded in node.js using discord.js.",
|
"description": "Woomy is a all-purpose discord bot built off the guidebot base and coded in node.js using discord.js.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@discordjs/opus": "^0.1.0",
|
||||||
"better-sqlite3": "^5.4.1",
|
"better-sqlite3": "^5.4.1",
|
||||||
"chalk": "^3.0.0",
|
"chalk": "^3.0.0",
|
||||||
"dblapi.js": "^2.3.1",
|
"dblapi.js": "^2.3.1",
|
||||||
|
@ -12,12 +13,13 @@
|
||||||
"garfield": "^1.1.2",
|
"garfield": "^1.1.2",
|
||||||
"get-youtube-id": "^1.0.1",
|
"get-youtube-id": "^1.0.1",
|
||||||
"hastebin-gen": "^2.0.5",
|
"hastebin-gen": "^2.0.5",
|
||||||
|
"is-url": "^1.2.4",
|
||||||
"moment": "^2.24.0",
|
"moment": "^2.24.0",
|
||||||
"moment-duration-format": "^2.3.2",
|
"moment-duration-format": "^2.3.2",
|
||||||
"prism-media": "^1.2.1",
|
"prism-media": "^1.2.1",
|
||||||
"randomcolor": "^0.5.4",
|
"randomcolor": "^0.5.4",
|
||||||
"request": "^2.88.2",
|
|
||||||
"relevant-urban": "^2.0.0",
|
"relevant-urban": "^2.0.0",
|
||||||
|
"request": "^2.88.2",
|
||||||
"urban": "^0.3.2",
|
"urban": "^0.3.2",
|
||||||
"url-unshort": "^5.0.0",
|
"url-unshort": "^5.0.0",
|
||||||
"url-unshorten": "^1.0.6",
|
"url-unshorten": "^1.0.6",
|
||||||
|
|
19
resources/other/coolpeople.json
Normal file
19
resources/other/coolpeople.json
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"coolPeople": [
|
||||||
|
"448354605617643520",
|
||||||
|
"433790467830972417",
|
||||||
|
"231777839576252417",
|
||||||
|
"285992938314661899",
|
||||||
|
"231704701433937931",
|
||||||
|
"324937993972350976",
|
||||||
|
"336492042299637771",
|
||||||
|
"273867501006225419",
|
||||||
|
"331870539897372672",
|
||||||
|
"304000458144481280",
|
||||||
|
"239787232666451980",
|
||||||
|
"264970229514371072",
|
||||||
|
"254310746450690048",
|
||||||
|
"358390849807319040",
|
||||||
|
"211011138656272386"
|
||||||
|
]
|
||||||
|
}
|
|
@ -5,12 +5,12 @@ exports.run = async (bot, message, args) => {
|
||||||
try{
|
try{
|
||||||
request({ uri: "https://catfact.ninja/facts", json: true }, (error, response, body) => {
|
request({ uri: "https://catfact.ninja/facts", json: true }, (error, response, body) => {
|
||||||
message.channel.send(`**Did you know?**\n ${body.data[0].fact}`);
|
message.channel.send(`**Did you know?**\n ${body.data[0].fact}`);
|
||||||
message.channel.startTyping();
|
message.channel.stopTyping();
|
||||||
});
|
});
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
message.channel.send(`<:error:466995152976871434> API error: ${err}`);
|
message.channel.send(`<:error:466995152976871434> API error: ${err}`);
|
||||||
message.channel.stopTyping();
|
message.channel.stopTyping();
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.conf = {
|
exports.conf = {
|
||||||
|
|
53
src/commands/colourify.js
Normal file
53
src/commands/colourify.js
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
const isURL = require("is-url")
|
||||||
|
exports.run = async (client, message, args) => {
|
||||||
|
var img;
|
||||||
|
if(!args[0]) {
|
||||||
|
if(!message.attachments.first()) {
|
||||||
|
return message.channel.send("No attachment")
|
||||||
|
};
|
||||||
|
img = message.attachments.first().attachment;
|
||||||
|
} else {
|
||||||
|
if(isURL(args[0]) == true ) {
|
||||||
|
img = args[0];
|
||||||
|
} else {
|
||||||
|
user = message.mentions.members.first();
|
||||||
|
|
||||||
|
if (!user) {
|
||||||
|
let users;
|
||||||
|
users = client.searchForMembers(message.guild, args[0]);
|
||||||
|
if (users.length > 1)
|
||||||
|
return message.channel.send(
|
||||||
|
"<:error:466995152976871434> Found multiple users! Please be more specific or mention the user instead."
|
||||||
|
);
|
||||||
|
else if (users.length == 0)
|
||||||
|
return message.channel.send(
|
||||||
|
"<:error:466995152976871434> That user doesn't seem to exist. Try again!"
|
||||||
|
);
|
||||||
|
user = users[0];
|
||||||
|
};
|
||||||
|
|
||||||
|
if(user) {
|
||||||
|
img = user.user.avatarURL({format: "png", dynamic: true})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var attachment = new Discord.MessageAttachment(`https://api.alexflipnote.dev/filter/magik?image=${img}`)
|
||||||
|
message.channel.send(attachment)
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.conf = {
|
||||||
|
enabled: true,
|
||||||
|
guildOnly: false,
|
||||||
|
aliases: [],
|
||||||
|
permLevel: "User",
|
||||||
|
requiredPerms: []
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.help = {
|
||||||
|
name: "magikt",
|
||||||
|
category: "Fun",
|
||||||
|
description: "Colourifies an image",
|
||||||
|
usage: "colourify user hex1 hex2"
|
||||||
|
};
|
||||||
|
|
|
@ -1,14 +1,49 @@
|
||||||
const request = require('request')
|
const request = require('request')
|
||||||
exports.run = async (client, message, args) => {
|
exports.run = async (client, message, args) => {
|
||||||
|
|
||||||
|
|
||||||
|
//NOT FINISHED
|
||||||
|
|
||||||
|
if(!args[0] || !args[1]) {
|
||||||
|
return message.channel.send(`<:error:466995152976871434> Please include two users`)
|
||||||
|
}
|
||||||
message.channel.startTyping();
|
message.channel.startTyping();
|
||||||
|
|
||||||
var user = client.getUserFromMention(args[0])
|
var user = client.getUserFromMention(args[0])
|
||||||
var user2 = client.getUserFromMention(args[1])
|
var user2 = client.getUserFromMention(args[1])
|
||||||
|
|
||||||
|
if (!user) {
|
||||||
|
let users;
|
||||||
|
users = client.searchForMembers(message.guild, args[0]);
|
||||||
|
if (users.length > 1)
|
||||||
|
return message.channel.send(
|
||||||
|
"<:error:466995152976871434> Found multiple users! Please be more specific or mention the user instead."
|
||||||
|
);
|
||||||
|
else if (users.length == 0)
|
||||||
|
return message.channel.send(
|
||||||
|
"<:error:466995152976871434> That user doesn't seem to exist. Try again!"
|
||||||
|
);
|
||||||
|
user = users[0];
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!user2) {
|
||||||
|
let users;
|
||||||
|
users = client.searchForMembers(message.guild, args[0]);
|
||||||
|
if (users.length > 1)
|
||||||
|
return message.channel.send(
|
||||||
|
"<:error:466995152976871434> Found multiple users! Please be more specific or mention the user instead."
|
||||||
|
);
|
||||||
|
else if (users.length == 0)
|
||||||
|
return message.channel.send(
|
||||||
|
"<:error:466995152976871434> That user doesn't seem to exist. Try again!"
|
||||||
|
);
|
||||||
|
user2 = users[0];
|
||||||
|
};
|
||||||
|
|
||||||
var secondLength = Math.floor(user2.username.length / 2);
|
var secondLength = Math.floor(user2.username.length / 2);
|
||||||
|
|
||||||
var first = user.username.substr(0, user.username.length / 2)
|
var first = user.username.slice(0, user.username.length / 2)
|
||||||
var second = user2.username.substr(secondLength, user2.username.length / 2)
|
var second = user2.username.slice(secondLength, user2.username.length / 2)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var attachment = new Discord.MessageAttachment(`https://api.alexflipnote.dev/ship?user=${user.avatarURL({format: "png"})}&user2=${user2.avatarURL({format: "png"})}`)
|
var attachment = new Discord.MessageAttachment(`https://api.alexflipnote.dev/ship?user=${user.avatarURL({format: "png"})}&user2=${user2.avatarURL({format: "png"})}`)
|
||||||
|
@ -22,7 +57,7 @@ exports.run = async (client, message, args) => {
|
||||||
|
|
||||||
exports.conf = {
|
exports.conf = {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
guildOnly: false,
|
guildOnly: true,
|
||||||
aliases: [],
|
aliases: [],
|
||||||
permLevel: "User",
|
permLevel: "User",
|
||||||
requiredPerms: []
|
requiredPerms: []
|
||||||
|
|
65
src/commands/ship1.js
Normal file
65
src/commands/ship1.js
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
const request = require('request')
|
||||||
|
exports.run = async (client, message, args) => {
|
||||||
|
|
||||||
|
|
||||||
|
//NOT FINISHED
|
||||||
|
|
||||||
|
if(!args[0] || !args[1]) {
|
||||||
|
return message.channel.send(`<:error:466995152976871434> Please include two to five users`)
|
||||||
|
}
|
||||||
|
message.channel.startTyping();
|
||||||
|
|
||||||
|
var user = client.getUserFromMention(args[0])
|
||||||
|
var user2 = client.getUserFromMention(args[1])
|
||||||
|
|
||||||
|
if (!user) {
|
||||||
|
let users;
|
||||||
|
users = client.searchForMembers(message.guild, args[0]);
|
||||||
|
if (users.length > 1)
|
||||||
|
return message.channel.send(
|
||||||
|
"<:error:466995152976871434> Found multiple users! Please be more specific or mention the user instead."
|
||||||
|
);
|
||||||
|
else if (users.length == 0)
|
||||||
|
return message.channel.send(
|
||||||
|
"<:error:466995152976871434> That user doesn't seem to exist. Try again!"
|
||||||
|
);
|
||||||
|
user = users[0];
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!user2) {
|
||||||
|
let users;
|
||||||
|
users = client.searchForMembers(message.guild, args[0]);
|
||||||
|
if (users.length > 1)
|
||||||
|
return message.channel.send(
|
||||||
|
"<:error:466995152976871434> Found multiple users! Please be more specific or mention the user instead."
|
||||||
|
);
|
||||||
|
else if (users.length == 0)
|
||||||
|
return message.channel.send(
|
||||||
|
"<:error:466995152976871434> That user doesn't seem to exist. Try again!"
|
||||||
|
);
|
||||||
|
user2 = users[0];
|
||||||
|
};
|
||||||
|
|
||||||
|
var secondLength = Math.floor(user2.username.length / 2);
|
||||||
|
|
||||||
|
var first = user.username.slice(0, user.username.length / 2)
|
||||||
|
var second = user2.username.slice(secondLength, user2.username.length / 2)
|
||||||
|
|
||||||
|
message.channel.send(`Your ship name is **${shipname}!**`)
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.conf = {
|
||||||
|
enabled: true,
|
||||||
|
guildOnly: true,
|
||||||
|
aliases: [],
|
||||||
|
permLevel: "User",
|
||||||
|
requiredPerms: []
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.help = {
|
||||||
|
name: "ship1",
|
||||||
|
category: "Fun",
|
||||||
|
description: "Ship two people together <3",
|
||||||
|
usage: "ship name name2"
|
||||||
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
|
const coolPeople = require('../../resources/other/coolpeople.json')
|
||||||
exports.run = (client, message, args) => {
|
exports.run = (client, message, args) => {
|
||||||
var user;
|
var user;
|
||||||
var guild;
|
var guild;
|
||||||
|
@ -13,6 +13,8 @@ exports.run = (client, message, args) => {
|
||||||
var tag;
|
var tag;
|
||||||
var id;
|
var id;
|
||||||
var bot;
|
var bot;
|
||||||
|
var coolPerson = false;
|
||||||
|
var friendos = coolPeople.coolPeople;
|
||||||
|
|
||||||
if(message.guild) {
|
if(message.guild) {
|
||||||
user = message.mentions.members.first();
|
user = message.mentions.members.first();
|
||||||
|
@ -39,6 +41,15 @@ exports.run = (client, message, args) => {
|
||||||
nick = `\n• **Nickname:** ${user.nickname}`;
|
nick = `\n• **Nickname:** ${user.nickname}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
for (var i = 0; i < friendos.length; i++) {
|
||||||
|
if (user.user.id == friendos[i])
|
||||||
|
coolPerson = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
if(coolPerson == true) {
|
||||||
|
badges += "🌟"
|
||||||
|
}
|
||||||
|
|
||||||
if(user.user.id == message.guild.ownerID) {
|
if(user.user.id == message.guild.ownerID) {
|
||||||
badges += "<:owner:685703193694306331>"
|
badges += "<:owner:685703193694306331>"
|
||||||
}
|
}
|
||||||
|
@ -47,6 +58,7 @@ exports.run = (client, message, args) => {
|
||||||
badges += "<:bot:686489601678114859>"
|
badges += "<:bot:686489601678114859>"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(badges.length > 0) {
|
if(badges.length > 0) {
|
||||||
badges += "\n"
|
badges += "\n"
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,19 +2,21 @@
|
||||||
const request = require('request')
|
const request = require('request')
|
||||||
exports.run = async (client, message, args) => {
|
exports.run = async (client, message, args) => {
|
||||||
const speech = args.join(' ');
|
const speech = args.join(' ');
|
||||||
if (!args[0]) {
|
if (!speech) {
|
||||||
return message.channel.send(`<:error:466995152976871434> Please include text for me to convert to yodish. Yes.`)
|
return message.channel.send(`<:error:466995152976871434> Please include text for me to convert to yodish. Yes.`)
|
||||||
}
|
};
|
||||||
try {
|
|
||||||
const { text } = request({ uri: `http://yoda-api.appspot.com/api/v1/yodish?text=${encodeURIComponent(speech.toLowerCase())}`, json: true }, (error, response, body) => {
|
message.channel.startTyping();
|
||||||
message.channel.send(JSON.parse(text).yodish)
|
try{
|
||||||
|
request({ uri: `http://yoda-api.appspot.com/api/v1/yodish?text=${encodeURIComponent(speech.toLowerCase())}`, json: true }, (error, response, body) => {
|
||||||
|
message.channel.send(body.yodish);
|
||||||
|
message.channel.stopTyping();
|
||||||
});
|
});
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
message.channel.send(`<:error:466995152976871434> API error: ${err}`);
|
message.channel.send(`<:error:466995152976871434> API error: ${err}`);
|
||||||
message.channel.stopTyping();
|
message.channel.stopTyping();
|
||||||
}
|
};
|
||||||
|
};
|
||||||
}
|
|
||||||
|
|
||||||
exports.conf = {
|
exports.conf = {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
|
|
|
@ -368,6 +368,6 @@ module.exports = client => {
|
||||||
});
|
});
|
||||||
|
|
||||||
process.on("unhandledRejection", err => {
|
process.on("unhandledRejection", err => {
|
||||||
client.logger.error(`Unhandled rejection: ${err.stack}`);
|
client.logger.error(`Unhandled rejection: ${err}`);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue