UNPKG

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.

45 lines (34 loc) 1.09 kB
const fetch = require("node-fetch"); async function Cum(options = {}) { var subreddits = [ 'buttloads', 'CumOnAss', 'bodyshots', 'cumsluts' ] 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 = { Cum };