Examples
Labs API (JavaScript / TypeScript), v1
List bots (ESM/TypeScript)
TypeScript
1import { LabsApiClient } from '@conscherry/labs-api';23const client = new LabsApiClient();4const res = await client.listBots({ limit: 10, sort: '-votes' });5console.log(res.data);
Get a bot by ID
TypeScript
1import { LabsApiClient } from '@conscherry/labs-api';23const client = new LabsApiClient();4const res = await client.getBotById('123456789012345678');5console.log(res.data);
Post stats (authenticated)
TypeScript
import { LabsApiClient } from '@conscherry/labs-api';const client = new LabsApiClient({ apiKey: process.env.LABS_API_KEY });await client.postStats({ botId: process.env.BOT_ID!, guildCount: 1500, userCount: 250000 });
Generic helpers
TypeScript
1import { LabsApiClient } from '@conscherry/labs-api';2const client = new LabsApiClient();34// GET /custom (no auth)5await client.get('/custom', { q: 'search' }, false);67// POST with auth8await client.post('/stats', { botId: '123456789012345678', guildCount: 1500 }, true);
Need more help?
Ask in our Discord or email support@conscherry.com.