Changed the way badmeme work so it dosent take from picture in a local folder... Much better

This commit is contained in:
Loïc Bersier 2018-09-08 20:50:34 +02:00
parent 7a75d7b9a0
commit c3c55dee44
14 changed files with 18 additions and 3 deletions

View file

@ -1,4 +1,5 @@
const { Command } = require('discord.js-commando');
const responseObject = require("../../picVid.json");
module.exports = class BadmemeCommand extends Command {
constructor(client) {
super(client, {
@ -11,7 +12,7 @@ module.exports = class BadmemeCommand extends Command {
run(message) {
const number = 12;
const imageNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1;
message.say( {files: ["./pictures/" + imageNumber + ".jpeg"]});
}
const picNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1;
message.channel.send(responseObject[picNumber]);
}
};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 177 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

14
randPic.json Normal file
View file

@ -0,0 +1,14 @@
{
"1": "https://i.imgur.com/yCEWNpx.jpg",
"2": "https://i.imgur.com/6iFrAeS.jpg",
"3": "https://i.imgur.com/jKACsbL.jpg",
"4": "https://i.imgur.com/320zo9S.jpg",
"5": "https://i.imgur.com/7fmPaAw.jpg",
"6": "https://i.imgur.com/xL34aws.jpg",
"7": "https://i.imgur.com/6ilt8Nk.jpg",
"8": "https://i.imgur.com/kFBXolM.jpg",
"9": "https://i.imgur.com/1ZsMPyi.jpg",
"10": "https://i.imgur.com/vfkI6iu.jpg",
"11": "https://i.imgur.com/dD5SRGs.jpg",
"12": "https://i.imgur.com/v1q67gw.jpg"
}