image-cord
Version:
It is a package used to make discord bots. It sends attachments of image manipulation, Anime, nsfw, and more pictures easily without any APIs.
43 lines (32 loc) • 1.05 kB
JavaScript
const fetch = require("node-fetch");
async function Bikini(options = {}) {
var subreddits = [
'bikinis',
'bikinibodies'
]
var reddit = subreddits[Math.round(Math.random() * (subreddits.length - 1))];
const data = await fetch(`https://meme-api.herokuapp.com/gimme/${reddit}`).then(res => res.json())
if (!data) return message.channel.send(`Sorry, seems like i can't connect to API.`);
const { title, postLink, url, subreddit } = data
const Data = {
embed: {
color: options.Color || "RANDOM",
url: postLink,
title: title,
image: { url: url },
footer: { text: `r/${subreddit} Powered By: Supreme Club` }
}
}
if (options.ResultOnly && options.ResultOnly === true) return {
Result: {
Url: postLink,
Title: title,
Image: url,
Subreddit: `${subreddit} Powered By: Supreme Club`
}
}
return Data;
};
module.exports = {
Bikini
};