Use API instead of attachments for Capybara command
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 8 KiB |
Before Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 7 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 9.9 KiB |
Before Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 9.3 KiB |
|
@ -4,7 +4,10 @@ module.exports = {
|
|||
description: "Sends a random image of a capybara"
|
||||
},
|
||||
run: (int, client, index) => {
|
||||
var dir = require("fs").readdirSync("capybara");
|
||||
int.reply({content: "Capybara", files: [__dirname + "/../capybara/" + dir[Math.floor(Math.random()*dir.length)]]});
|
||||
var axios = require("axios").default;
|
||||
axios("http://theinteger.org:4000/random").then(res => {
|
||||
console.log(res.data.url);
|
||||
int.reply({embeds: [{title: "Capybara", color: "#00FFFF", image: {url: res.data.url}}]});
|
||||
});
|
||||
}
|
||||
}
|