__path = process.cwd()
var express = require('express');
var creatorList = ['@yogi','@yogi','@yogi','@yogi', '@yogi','@yogi','@yogi'];
var creator = creatorList[Math.floor(Math.random() * creatorList.length)];
var zrapi = require("zrapi");
var secure = require('ssl-express-www');
var cors = require('cors');
var fetch = require('node-fetch');
var cheerio = require('cheerio');
var request = require('request');
var router = express.Router();
var { color, bgcolor } = require(__path + '/lib/color.js');
var {
SearchKartun,
Movie,
Action,
Adventure,
Drama,
Comedy,
Military
} = require('./../lib');
router.get('/promote', async (req, res, next) => {
if (!req.query.name) return res.json({ status: 404, error: 'masukkan param name'})
if (!req.query.msg) return res.json({ status: 404, error: 'masukkan param msg'})
if (!req.query.mem) return res.json({ status: 404, error: 'masukkan param mem'})
if (!req.query.picurl) return res.json({ status: 404, error: 'masukkan param picurl'})
if (!req.query.bgurl) return res.json({ status: 404, error: 'masukkan param bgurl'})
var canvas = require('discanvas')
const welcomer = await new canvas.Welcome()
.setAvatar(req.query.picurl)
.setUsername(${req.query.name}#${req.query.mem}
)
.setBackground("BACKGROUND", req.query.bgurl)
//or : .setBackground("COLOR", "#ff5555")
.setMainText("Promote")
.setSecondText(req.query.msg)
/*
.setCircleColor("#ff5555")
.setMainTextColor("#ff5555")
.setSecondTextColor("#ff5555")
.setPseudoColor("#ff5555")
*/
.toWelcome()
const base64 = ${welcomer.toBuffer().toString('base64')}
buffer = Buffer.from(base64, 'base64')
res.type('png');
res.send(buffer)
})
router.get('/demote', async (req, res, next) => {
if (!req.query.name) return res.json({ status: 404, error: 'masukkan param name'})
if (!req.query.msg) return res.json({ status: 404, error: 'masukkan param msg'})
if (!req.query.mem) return res.json({ status: 404, error: 'masukkan param mem'})
if (!req.query.picurl) return res.json({ status: 404, error: 'masukkan param picurl'})
if (!req.query.bgurl) return res.json({ status: 404, error: 'masukkan param bgurl'})
var canvas = require('discanvas')
const welcomer = await new canvas.Welcome()
.setAvatar(req.query.picurl)
.setUsername(${req.query.name}#${req.query.mem}
)
.setBackground("BACKGROUND", req.query.bgurl)
//or : .setBackground("COLOR", "#ff5555")
.setMainText("Demote")
.setSecondText(req.query.msg)
/*
.setCircleColor("#ff5555")
.setMainTextColor("#ff5555")
.setSecondTextColor("#ff5555")
.setPseudoColor("#ff5555")
*/
.toWelcome()
const base64 = ${welcomer.toBuffer().toString('base64')}
buffer = Buffer.from(base64, 'base64')
res.type('png');
res.send(buffer)
})
router.get('/welcome2', async (req, res, next) => {
if (!req.query.name) return res.json({ status: 404, error: 'masukkan param name'})
if (!req.query.mem) return res.json({ status: 404, error: 'masukkan param mem'})
if (!req.query.gcname) return res.json({ status: 404, error: 'masukkan param gcname'})
if (!req.query.picurl) return res.json({ status: 404, error: 'masukkan param picurl'})
if (!req.query.bgurl) return res.json({ status: 404, error: 'masukkan param bgurl'})
if (!req.query.gcicon) return res.json({ status: 404, error: 'masukkan param gcicon'})
const ling = require("knights-canvas")
const welcomer = await new ling.Welcome()
.setUsername(req.query.name)
.setGuildIcon(req.query.gcicon)
.setGuildName(req.query.gcname)
.setAvatar(req.query.picurl)
.setMemberCount(req.query.mem)
.setAvatar(req.query.picurl)
.setBackground(req.query.bgurl)
.toAttachment()
const base64 = ${welcomer.toBuffer().toString('base64')}
buffer = Buffer.from(base64, 'base64')
res.type('png');
res.send(buffer)
})
router.get('/goodbye2', async (req, res, next) => {
if (!req.query.name) return res.json({ status: 404, error: 'masukkan param name'})
if (!req.query.mem) return res.json({ status: 404, error: 'masukkan param mem'})
if (!req.query.gcname) return res.json({ status: 404, error: 'masukkan param gcname'})
if (!req.query.picurl) return res.json({ status: 404, error: 'masukkan param picurl'})
if (!req.query.bgurl) return res.json({ status: 404, error: 'masukkan param bgurl'})
if (!req.query.gcicon) return res.json({ status: 404, error: 'masukkan param gcicon'})
const ling = require("knights-canvas")
const welcomer = await new ling.Goodbye()
.setUsername(req.query.name)
.setGuildIcon(req.query.gcicon)
.setGuildName(req.query.gcname)
.setAvatar(req.query.picurl)
.setMemberCount(req.query.mem)
.setAvatar(req.query.picurl)
.setBackground(req.query.bgurl)
.toAttachment()
const base64 = ${welcomer.toBuffer().toString('base64')}
buffer = Buffer.from(base64, 'base64')
res.type('png')
res.send(buffer)
})
router.get('/welcome', async (req, res, next) => {
if (!req.query.name) return res.json({ status: 404, error: 'masukkan param name'})
if (!req.query.mem) return res.json({ status: 404, error: 'masukkan param mem'})
if (!req.query.gcname) return res.json({ status: 404, error: 'masukkan param gcname'})
if (!req.query.picurl) return res.json({ status: 404, error: 'masukkan param picurl'})
if (!req.query.bgurl) return res.json({ status: 404, error: 'masukkan param bgurl'})
var canvas = require('discord-canvas')
const welcomer = await new canvas.Welcome()
.setUsername(req.query.name)
.setDiscriminator(req.query.mem)
.setMemberCount(req.query.mem)
.setGuildName(req.query.gcname)
.setAvatar(req.query.picurl)
.setColor('border', '#00100C')
.setColor('username-box', '#00100C')
.setColor('discriminator-box', '#00100C')
.setColor('message-box', '#00100C')
.setColor('title', '#00FFFF')
.setBackground(req.query.bgurl)
.toAttachment()
const base64 = ${welcomer.toBuffer().toString('base64')}
buffer = Buffer.from(base64, 'base64')
res.type('png');
res.send(buffer)
})
router.get('/goodbye', async (req, res, next) => {
if (!req.query.name) return res.json({ status: 404, error: 'masukkan param name'})
if (!req.query.mem) return res.json({ status: 404, error: 'masukkan param mem'})
if (!req.query.gcname) return res.json({ status: 404, error: 'masukkan param gcname'})
if (!req.query.picurl) return res.json({ status: 404, error: 'masukkan param picurl'})
if (!req.query.bgurl) return res.json({ status: 404, error: 'masukkan param bgurl'})
var canvas = require('discord-canvas')
const welcomer = await new canvas.Goodbye()
.setUsername(req.query.name)
.setDiscriminator(req.query.mem)
.setMemberCount(req.query.mem)
.setGuildName(req.query.gcname)
.setAvatar(req.query.picurl)
.setColor('border', '#00100C')
.setColor('username-box', '#00100C')
.setColor('discriminator-box', '#00100C')
.setColor('message-box', '#00100C')
.setColor('title', '#00FFFF')
.setBackground(req.query.bgurl)
.toAttachment()
const base64 = ${welcomer.toBuffer().toString('base64')}
buffer = Buffer.from(base64, 'base64')
res.type('png')
res.send(buffer)
})
//TEXTPRO 2 TEXT
router.get('/textpro/porn-hub', async(req, res, next) => {
const text = req.query.text1;
const text2 = req.query.text2;
zrapi.textpro("https://textpro.me/pornhub-style-logo-online-generator-free-977.html", [
text, text2
])
.then((data) => {
res.json({
status: true,
code: 200,
creator: ${creator}
,
result: data
})
})
.catch((err) => console.log(err));
});
router.get('/textpro/avenger', async(req, res, next) => {
const text = req.query.text1;
const text2 = req.query.text2;
zrapi.textpro("https://textpro.me/create-3d-avengers-logo-online-974.html", [
text, text2
])
.then((data) => {
res.json({
status: true,
code: 200,
creator: ${creator}
,
result: data
})
})
.catch((err) => console.log(err));
});
router.get('/textpro/space3d', async(req, res, next) => {
const text = req.query.text1;
const text2 = req.query.text2;
zrapi.textpro("https://textpro.me/create-space-3d-text-effect-online-985.html", [
text, text2
])
.then((data) => {
res.json({
status: true,
code: 200,
creator: ${creator}
,
result: data
})
})
.catch((err) => console.log(err));
});
router.get('/textpro/marvel', async(req, res, next) => {
const text = req.query.text1;
const text2 = req.query.text2;
zrapi.textpro("https://textpro.me/create-logo-style-marvel-studios-ver-metal-972.html", [
text, text2
])
.then((data) => {
res.json({
status: true,
code: 200,
creator: ${creator}
,
result: data
})
})
.catch((err) => console.log(err));
});
router.get('/textpro/glitch', async(req, res, next) => {
const text = req.query.text1;
const text2 = req.query.text2;
zrapi.textpro("https://textpro.me/create-glitch-text-effect-style-tik-tok-983.html", [
text, text2
])
.then((data) => {
res.json({
status: true,
code: 200,
creator: ${creator}
,
result: data
})
})
.catch((err) => console.log(err));
});
router.get('/textpro/graffity', async(req, res, next) => {
const text = req.query.text1;
const text2 = req.query.text2;
zrapi.textpro("https://textpro.me/create-cool-wall-graffiti-text-effect-online-1009.html", [
text, text2
])
.then((data) => {
res.json({
status: true,
code: 200,
creator: ${creator}
,
result: data
})
})
.catch((err) => console.log(err));
});
router.get('/textpro/steeltext', async(req, res, next) => {
const text = req.query.text1;
const text2 = req.query.text2;
zrapi.textpro("https://textpro.me/3d-steel-text-effect-877.html", [
text, text2
])
.then((data) => {
res.json({
status: true,
code: 200,
creator: ${creator}
,
result: data
})
})
.catch((err) => console.log(err));
});
router.get('/textpro/stonetext', async(req, res, next) => {
const text = req.query.text1;
const text2 = req.query.text2;
zrapi.textpro("https://textpro.me/create-a-stone-text-effect-online-982.html", [
text, text2
])
.then((data) => {
res.json({
status: true,
code: 200,
creator: ${creator}
,
result: data
})
})
.catch((err) => console.log(err));
});
//TEXTPRO 1TEXT
router.get('/textpro/techstyle', async(req, res, next) => {
const text = req.query.text;
zrapi.textpro("https://textpro.me/robot-r2-d2-text-effect-903.html", [
text
])
.then((data) => {
res.json({
status: true,
code: 200,
creator: ${creator}
,
result: data
})
})
.catch((err) => console.log(err));
});
router.get('/textpro/techstyle2', async(req, res, next) => {
const text = req.query.text;
zrapi.textpro("https://textpro.me/sci-fi-text-effect-855.html", [
text
])
.then((data) => {
res.json({
status: true,
code: 200,
creator: ${creator}
,
result: data
})
})
.catch((err) => console.log(err));
});
router.get('/textpro/equalizer', async(req, res, next) => {
const text = req.query.text;
zrapi.textpro("https://textpro.me/rainbow-equalizer-text-effect-902.html", [
text
])
.then((data) => {
res.json({
status: true,
code: 200,
creator: ${creator}
,
result: data
})
})
.catch((err) => console.log(err));
});
router.get('/textpro/papercut', async(req, res, next) => {
const text = req.query.text;
zrapi.textpro("https://textpro.me/create-art-paper-cut-text-effect-online-1022.html", [
text
])
.then((data) => {
res.json({
status: true,
code: 200,
creator: ${creator}
,
result: data
})
})
.catch((err) => console.log(err));
});
router.get('/textpro/gluetext', async(req, res, next) => {
const text = req.query.text;
zrapi.textpro("https://textpro.me/create-3d-glue-text-effect-with-realistic-style-986.html", [
text
])
.then((data) => {
res.json({
status: true,
code: 200,
creator: ${creator}
,
result: data
})
})
.catch((err) => console.log(err));
});
router.get('/textpro/captainamerika', async(req, res, next) => {
const text = req.query.text;
zrapi.textpro("https://textpro.me/captain-america-text-effect-905.html", [
text
])
.then((data) => {
res.json({
status: true,
code: 200,
creator: ${creator}
,
result: data
})
})
.catch((err) => console.log(err));
});
router.get('/textpro/blood', async(req, res, next) => {
const text = req.query.text;
zrapi.textpro("https://textpro.me/horror-blood-text-effect-online-883.html", [
text
])
.then((data) => {
res.json({
status: true,
code: 200,
creator: ${creator}
,
result: data
})
})
.catch((err) => console.log(err));
});
module.exports = router