Hastebin (hastebin.hyrousek.tk)

Free Hastebin Server. Save your text

You can easy upload text with bot

index.js
.env
package.json
index.js
// EXAMPLE CODE FOR HASTEBIN
const hastebin = require('hastebin.js');
const Discord = require("discord.js")
const example = new Discord.Client()
example.on("ready", () => {
console.log("BOT Started!")
})
example.on("message", async(message) => {
const prefix = "!"
const args = message.content.slice(prefix.length).trim().split(/ +/g);
const cmd = args.shift().toLowerCase()
if(cmd === "hastebin") {
const haste = new hastebin({ url: 'https://hastebin.hyrousek.tk' });
var text = args.join(" ")
if(!text) return message.channel.send("Please define args")
var link = await haste.post(text)
message.channel.send(`Your link is: ${link}`)
}
})
example.login(process.env.token)
.env
TOKEN=discord bot token
package.json
{
"main": "index.js",
"scripts": {
"start": "node index.js"
},
"dependencies": {
"discord.js": "^12.2.0",
"hastebin.js": "^1.3.2"
},
"engines": {
"node": "12.x"
},
"license": "MIT"
}