Developer Platform

Build on Loqa

Discord-compatible SDKs for JavaScript and Python. Port your bot in minutes, or build something entirely new with the REST API and WebSocket gateway.

Drop-in Discord Compatible

loqa.js mirrors discord.js v14. loqa.py mirrors discord.py. Port your existing bot by changing one import — the rest just works.

🟨

loqa.js

Drop-in discord.js v14 replacement

ClientSlashCommandBuilderEmbedBuilder ButtonBuilderModalBuilderActionRowBuilder REST / RoutesCollectionext.commands ext.tasksEventsPermissions
npm install loqa.js
🐍

loqa.py

Drop-in discord.py replacement

ClientBotContext CogHelpCommandEmbed ui.Viewui.Buttonui.Select ui.ModalIntentsColour
pip install loqa.py

Your First Bot in 60 Seconds

const { Client, Events, EmbedBuilder } = require('loqa.js');

const client = new Client({
  intents: { guilds: true, messages: true, messageContent: true },
  apiUrl:     'https://api.loqa.chat/api',
  gatewayUrl: 'wss://api.loqa.chat/api/gateway',
});

client.once(Events.ClientReady, () => {
  console.log(`Logged in as ${client.user.name}`);
});

client.on(Events.MessageCreate, async (message) => {
  if (message.content === '!ping') {
    await message.reply('Pong! 🏓');
  }
});

client.login(process.env.LOQA_TOKEN);

REST API & WebSocket Gateway

Full HTTP API and real-time WebSocket gateway. Discord-compatible rate limit headers, Snowflake IDs, and familiar endpoint patterns.

🌐 REST API

Standard RESTful endpoints for all platform operations.

  • Servers, channels, messages, members, roles
  • File uploads, embeds, reactions
  • Slash commands and interactions
  • OpenAPI / Swagger documentation
POST /api/channels/{channel_id}/messages

⚡ WebSocket Gateway

Real-time events over a persistent WebSocket connection.

  • Messages, typing, presence, reactions
  • Member join/leave/update, role changes
  • Channel/server create/update/delete
  • Heartbeat with automatic reconnection
wss://api.loqa.chat/api/gateway

🔑 Authentication

Simple token-based authentication for bots and users.

  • Bot tokens for automated integrations
  • Bearer token via Authorization header
  • Discord-compatible rate limit headers
  • Snowflake IDs for all entities
Authorization: Bot YOUR_TOKEN

🔄 Discord Bridge

Bidirectional message bridge between Discord and Loqa.

  • Mirror messages between platforms
  • Sync embeds, attachments, and reactions
  • Run alongside existing Discord communities
  • Zero changes needed to existing Discord bots
npx loqa-discord-bridge

Port from Discord in One Line

loqa.js and loqa.py are designed as drop-in replacements. Rename the import, point to Loqa's API, and you're done.

JavaScript / Node.js

const { Client } = require('discord.js');
const { Client } = require('loqa.js');

Python

import discord
import loqa

Compatibility Matrix

discord.js / discord.pyloqa.js / loqa.pyStatus
ClientClient
Bot / commands.BotBot / commands.Bot
EmbedBuilder / EmbedEmbedBuilder / Embed
SlashCommandBuilderSlashCommandBuilder
ButtonBuilder / ui.ButtonButton / ui.Button
ModalBuilder / ui.ModalModal / ui.Modal
ActionRowBuilder / ui.ViewActionRow / ui.View
CollectionCollection
EventsEvents
REST / RoutesREST / Routes
IntentsIntents
PermissionsPermissions
ext.commands / Cogext.commands / Cog
ext.tasksext.tasks

Ready to build?

Create a bot account in your server settings, grab the token, and start coding.