Hubie is working on it...
Hubie is working on it...
Tools
There is no hosted bot to add to your server, but the public API makes it easy to run your own. Create an API key and use the snippet below with discord.js.
// npm i discord.js
import { Client, GatewayIntentBits } from "discord.js";
const API_KEY = process.env.HUBIE_KEY;
const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent] });
client.on("messageCreate", async (message) => {
if (message.author.bot) return;
const file = message.attachments.first();
if (!file || !file.contentType?.startsWith("image/")) return;
const image = await fetch(file.url).then((r) => r.blob());
const form = new FormData();
form.append("files", image, file.name);
const res = await fetch("https://uploadwithhubie.com/api/v1/upload", {
method: "POST",
headers: { Authorization: `Bearer ${API_KEY}` },
body: form,
});
const data = await res.json();
await message.reply(data.images?.[0]?.directUrl ?? "Upload failed");
});
client.login(process.env.DISCORD_TOKEN);Tip: create a dedicated API key for the bot and revoke it if the token leaks.