External File Storage for Photos

This commit is contained in:
Daniel Odendahl Jr
2017-04-26 20:47:03 +00:00
parent d376484566
commit 041ae7fb7c
126 changed files with 52 additions and 163 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ module.exports = class YearsCommand extends Command {
const userAvatar = user.displayAvatarURL.replace('.jpg', '.png').replace('.gif', '.png');
let images = [];
images.push(Jimp.read(userAvatar));
images.push(Jimp.read('./images/3000years.png'));
images.push(Jimp.read('https://i.imgur.com/eScwGFS.png'));
const [avatar, years] = await Promise.all(images);
avatar.resize(200, 200);
years.blit(avatar, 461, 127);
+1 -1
View File
@@ -27,7 +27,7 @@ module.exports = class BeautifulCommand extends Command {
const userAvatar = user.displayAvatarURL.replace('.jpg', '.png').replace('.gif', '.png');
let images = [];
images.push(Jimp.read(userAvatar));
images.push(Jimp.read('./images/beautiful.jpg'));
images.push(Jimp.read('https://i.imgur.com/OOQ9QwQ.jpg'));
const [avatar, beautiful] = await Promise.all(images);
avatar.resize(200, 200);
beautiful.blit(avatar, 432, 42);
+1 -1
View File
@@ -28,7 +28,7 @@ module.exports = class BobRossCommand extends Command {
const blank = new Jimp(600, 775, 0xFFFFFF);
let images = [];
images.push(Jimp.read(userAvatar));
images.push(Jimp.read('./images/BobRoss.png'));
images.push(Jimp.read('https://i.imgur.com/7NSiFLd.png'));
const [avatar, bob] = await Promise.all(images);
avatar.rotate(2);
avatar.resize(300, 300);
+1 -1
View File
@@ -28,7 +28,7 @@ module.exports = class RIPCommand extends Command {
const userAvatar = user.displayAvatarURL.replace('.jpg', '.png').replace('.gif', '.png');
let images = [];
images.push(Jimp.read(userAvatar));
images.push(Jimp.read('./images/gravestone.png'));
images.push(Jimp.read('https://i.imgur.com/KriteWm.jpg'));
const [avatar, gravestone] = await Promise.all(images);
avatar.resize(200, 200);
gravestone.blit(avatar, 158, 51);
+1 -1
View File
@@ -29,7 +29,7 @@ module.exports = class SteamCardCommand extends Command {
const blank = new Jimp(494, 568, 0xFFFFFF);
let images = [];
images.push(Jimp.read(userAvatar));
images.push(Jimp.read('./images/SteamCard.png'));
images.push(Jimp.read('https://i.imgur.com/JF0WwQX.png'));
const [avatar, steamcard] = await Promise.all(images);
const font = await Jimp.loadFont(Jimp.FONT_SANS_32_WHITE);
avatar.resize(450, 450);
+1 -1
View File
@@ -27,7 +27,7 @@ module.exports = class WarnCommand extends Command {
}
hasPermission(msg) {
return msg.member.permissions.has('MANAGE_MESSAGES');
return msg.member.permissions.has('KICK_MEMBERS');
}
async run(message, args) {
+1 -1
View File
@@ -14,6 +14,6 @@ module.exports = class SpamCommand extends Command {
if (message.channel.type !== 'dm')
if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return message.say('This Command requires the `Attach Files` Permission.');
return message.channel.send({files: ['./images/Spam.jpg']});
return message.channel.send({files: ['https://i.imgur.com/2JFu5xE.jpg']});
}
};
+1 -1
View File
@@ -19,6 +19,6 @@ module.exports = class CatCommand extends Command {
if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return message.say('This Command requires the `Attach Files` Permission.');
const cat = cats[Math.floor(Math.random() * cats.length)];
return message.channel.send({files: [`./images/Cat${cat}`]});
return message.channel.send({files: [cat]});
}
};
+20 -20
View File
@@ -1,22 +1,22 @@
[
"1.jpg",
"2.jpg",
"3.jpg",
"4.jpg",
"5.jpg",
"6.jpg",
"7.jpg",
"8.jpg",
"9.jpg",
"10.jpg",
"11.jpeg",
"12.jpg",
"13.jpeg",
"14.png",
"15.jpg",
"16.jpg",
"17.jpg",
"18.jpg",
"19.jpg",
"20.jpg"
"https://i.imgur.com/BYIsrcy.jpg",
"https://i.imgur.com/4huevNv.jpg",
"https://i.imgur.com/I52wMLL.jpg",
"https://i.imgur.com/51xZFRg.jpg",
"https://i.imgur.com/4CfKp58.jpg",
"https://i.imgur.com/vNU99Ix.jpg",
"https://i.imgur.com/Fvru0x5.jpg",
"https://i.imgur.com/pBbf7gu.jpg",
"https://i.imgur.com/A7UjE8I.jpg",
"https://i.imgur.com/qfGSFCa.jpg",
"https://i.imgur.com/e3isfmE.jpg",
"https://i.imgur.com/kEDeoUT.jpg",
"https://i.imgur.com/pta9FML.jpg",
"https://i.imgur.com/HKhVeiV.jpg",
"https://i.imgur.com/1qpQesN.jpg",
"https://i.imgur.com/lEeoU0b.jpg",
"https://i.imgur.com/VINBpuw.jpg",
"https://i.imgur.com/1dp1koX.jpg",
"https://i.imgur.com/N586OTx.jpg",
"https://i.imgur.com/0T1ykQI.jpg"
]
-24
View File
@@ -1,24 +0,0 @@
const { Command } = require('discord.js-commando');
const potatoes = require('./potatoes');
module.exports = class PotatoCommand extends Command {
constructor(client) {
super(client, {
name: 'potato',
aliases: [
'tater'
],
group: 'randomimg',
memberName: 'potato',
description: 'Sends a random potato image.'
});
}
run(message) {
if (message.channel.type !== 'dm')
if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return message.say('This Command requires the `Attach Files` Permission.');
const potato = potatoes[Math.floor(Math.random() * potatoes.length)];
return message.channel.send({files: [`./images/Potato${potato}`]});
}
};
-11
View File
@@ -1,11 +0,0 @@
[
"1.jpg",
"2.jpg",
"3.jpg",
"4.jpg",
"5.gif",
"6.png",
"7.jpg",
"8.jpg",
"9.jpg"
]
-21
View File
@@ -1,21 +0,0 @@
const { Command } = require('discord.js-commando');
const puns = require('./puns');
module.exports = class RandomPunCommand extends Command {
constructor(client) {
super(client, {
name: 'pun',
group: 'randomimg',
memberName: 'pun',
description: 'Sends a random pun image.'
});
}
run(message) {
if (message.channel.type !== 'dm')
if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return message.say('This Command requires the `Attach Files` Permission.');
const pun = puns[Math.floor(Math.random() * puns.length)];
return message.channel.send({files: [`./images/Pun${pun}`]});
}
};
-55
View File
@@ -1,55 +0,0 @@
[
"1.jpg",
"2.jpg",
"3.jpg",
"4.jpg",
"5.jpg",
"6.jpg",
"7.jpg",
"8.png",
"9.jpg",
"10.jpg",
"11.jpg",
"12.jpg",
"13.jpg",
"14.jpg",
"15.jpg",
"16.jpg",
"17.jpg",
"18.jpg",
"19.jpg",
"20.jpg",
"21.jpg",
"22.jpg",
"23.jpg",
"24.jpg",
"25.jpg",
"26.jpg",
"27.jpg",
"28.jpg",
"29.jpg",
"30.jpeg",
"31.jpg",
"32.jpg",
"33.jpg",
"34.png",
"35.jpg",
"36.jpg",
"37.jpg",
"38.jpg",
"39.jpg",
"40.jpg",
"41.jpg",
"42.jpg",
"43.jpg",
"44.jpg",
"45.gif",
"46.jpg",
"47.jpg",
"48.jpg",
"49.jpg",
"50.jpg",
"51.jpg",
"52.jpg",
"53.jpg"
]
+1 -1
View File
@@ -19,6 +19,6 @@ module.exports = class XiaoCommand extends Command {
if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return message.say('This Command requires the `Attach Files` Permission.');
const xiao = xiaos[Math.floor(Math.random() * xiaos.length)];
return message.channel.send({files: [`./images/Xiao${xiao}`]});
return message.channel.send({files: [xiao]});
}
};
+21 -21
View File
@@ -1,23 +1,23 @@
[
"1.png",
"2.jpg",
"3.jpg",
"4.jpg",
"5.jpg",
"6.jpg",
"7.jpg",
"8.png",
"9.png",
"10.png",
"11.png",
"12.png",
"13.jpg",
"14.jpg",
"15.png",
"16.jpg",
"17.png",
"18.gif",
"19.png",
"20.jpg",
"21.jpg"
"https://i.imgur.com/tyVciSC.png",
"https://i.imgur.com/dTGqFFe.jpg",
"https://i.imgur.com/bB1FpdZ.jpg",
"https://i.imgur.com/BuO0RHc.jpg",
"https://i.imgur.com/oXCxBSe.jpg",
"https://i.imgur.com/Wf6Kss3.jpg",
"https://i.imgur.com/OiFboDi.jpg",
"https://i.imgur.com/3Z56sKT.png",
"https://i.imgur.com/rBLuUPT.png",
"https://i.imgur.com/XSuTmzl.png",
"https://i.imgur.com/sBIo3oF.png",
"https://i.imgur.com/dcWMZnv.png",
"https://i.imgur.com/nh6kZjH.jpg",
"https://i.imgur.com/DbBeMgY.png",
"https://i.imgur.com/qaXCHLv.png",
"https://i.imgur.com/34itKmU.jpg",
"https://i.imgur.com/3pbBjxN.png",
"https://i.imgur.com/bKx1XuE.gif",
"https://i.imgur.com/iSVUORW.png",
"https://i.imgur.com/O2JLT8q.jpg",
"https://i.imgur.com/kEAj26f.jpg"
]
+1 -1
View File
@@ -15,7 +15,7 @@
<li>Get Server Info</li>
<li>Optional Member Join/Leave Logging</li>
<li>Moderation Commands, Including Prune, Ban/Kick/Unban/Warn (with Logging), and Lockdown.</li>
<li>Random Images (Cat, Pun, Potato, etc.)</li>
<li>Random Images</li>
<li>Magic 8 Ball</li>
<li>Avatar Editing (RIP, Bob Ross, etc.)</li>
<li>Make Strawpolls</li>
+1 -1
View File
@@ -22,7 +22,7 @@
<li>Get Server Info</li>
<li>Optional Member Join/Leave Logging</li>
<li>Moderation Commands, Including Prune, Ban/Kick/Unban/Warn (with Logging), and Lockdown.</li>
<li>Random Images (Cat, Pun, Potato, etc.)</li>
<li>Random Images</li>
<li>Magic 8 Ball</li>
<li>Avatar Editing (RIP, Bob Ross, etc.)</li>
<li>Make Strawpolls</li>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 554 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 674 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 286 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 405 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 619 KiB

Some files were not shown because too many files have changed in this diff Show More