random-memes-logo
random-memes


npm i random-memes --save

random-memes Random Meme Generator

random-memes-download-count random-memes-dependencies random-memes-license random-memes-dependents random-memes-version
Random reddit & custom api meme genarator and custom meme maker module for node.js
Documentation Page
What can be done with random-memes?:
Create your own memes with random-memes!
Create random meme with custom api
Create random meme with reddit api

Get random memes from custom api

const memes = require("random-memes");

memes.random().then(meme => {

console.log("Meme generated: " + meme.image)

//returns image link

console.log("Category: " + meme.category)

//returns category

console.log("Caption: " + meme.caption)

//returns image caption console.log("ID: " + meme.id)

//returns id })

Get random memes from reddit api

const memes = require("random-memes");
memes.fromReddit("en").then((meme)=>{
console.log(meme);
console.log(meme.image);
})





Make your own memes! with random-memes

let memecontent = {

toptext: req.body.toptext,

bottomtext: req.body.bottomtext,

getdataurl: true

// getbuffer: true,

// savefile: true,

// "toptext-x":100, "toptext-y":50, "bottomtext-x":100, "bottomtext-y":300,

// filename: "filename",

// fileformat: "png"

};

memes.createMeme("IMAGE_URL", memecontent).then(meme => {

console.log(meme)

// returns dataurl, if you want save file or get buffer data just edit memecontent object

});

Also you can check online meme creator example

and documentation page

Write code to have fun with your friends

let memecontent = {
"photo1: "./me.png",
"photo1-x": 130,
"photo1-y": 130,
photo2: "./myfriend.png",
"photo2-x": 300,
"photo2-y": 150,
savefile: true,
filename: "wmyfriend",
fileformat: "png"
};
memes
.createDuoMeme(
"./bear.png", memecontent);
All Examples:
Telegram (Telegraf.js) Random-Meme Generator
Discord (Discord.js) Create Duo Meme
Online Meme Creator with Express.js
Get Reddit Memes



See full documentation in here