Psst.. new poll here.
[email protected] web/email now available. Want one? Go here.
Cannot use outlook/hotmail/live here to register as they blocking our mail servers. #microsoftdeez
Obey the Epel!
Paste
Pasted as JavaScript by yarark ( 4 years ago )
const Discord = require("discord.js");
const ayarlar = require("../ayarlar.json")
const https = require("https");
exports.run = async (client, message, args) => {
const input = args.join(" ");
if (!input) return message.reply("Lütfen bi yazı giriniz.");
const apiId = "40694682-95fa-44bc-9d3c-5135d7cc3c9d";
const apiKey = "a0a6ec04-8c7f-4cf9-89e3-258bca9bec5f";
const data = JSON.stringify({
html: input
});
const options = {
hostname: "hcti.io",
port: 443,
path: "/v1/image",
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization:
"Basic " + new Buffer(apiId + ":" + apiKey).toString("base64")
}
};
const req = https.request(options, res => {
res.on("data", d => {
const image = JSON.parse(d);
const em = new Discord.RichEmbed()
.setAuthor("Render:")
.setImage(image["url"])
.setColor("#36393F");
message.channel.send(em);
});
});
req.on("error", error => {
console.error(error);
return message.channel.send(error.message);
});
req.write(data);
req.end();
}
exports.conf = {
enabled: true,
guildOnly: false,
aliases: ["yazıresim","yazıimage","textimage","yaziresim"],
permLevel: 0
};
exports.help = {
name: 'yazırender',
description: 'TesT Komutudur',
usage: 'yazırender <yazı>'
};
//XiR
Revise this Paste
Parent: 106407