Developers
@discapedia/sdk — a typed, zero-dependency client.
@discapedia/sdk is a typed, zero-dependency fetch client for the API.
pnpm add @discapedia/sdk
import { DiscapediaClient } from "@discapedia/sdk";
const dp = new DiscapediaClient({ apiKey: process.env.DISCAPEDIA_API_KEY! });
// Listings
const mine = await dp.servers.list();
const { server } = await dp.servers.create({
guildId: "700000000000000000",
name: "Aether Lounge",
tagline: "A 24/7 hangout that feels like home.",
description: "Active voice channels around the clock.",
inviteUrl: "https://discord.gg/aether",
categorySlug: "social",
tags: ["chill", "voice-chat"],
});
await dp.servers.update(server.id, { tagline: "Now with weekly game nights." });
// Ads
const { campaign } = await dp.campaigns.create({
name: "Launch push",
serverSlug: "aether-lounge",
headline: "Find your people",
body: "Join the most active social server on Discord.",
budgetCents: 5000,
bidCents: 60,
});
await dp.campaigns.update(campaign.id, { status: "paused" });
// Directory
const results = await dp.directory.search({ q: "anime", sort: "trending" });
Failed calls throw DiscapediaApiError with .code, .message, and .status.
There is no bump() method — bumping is Discord-only. See Bumping.