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.
SDKs
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
npm install loqa.js Quick Start
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); API
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 Migration
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
Python
Compatibility Matrix
| discord.js / discord.py | loqa.js / loqa.py | Status |
|---|---|---|
| Client | Client | ✅ |
| Bot / commands.Bot | Bot / commands.Bot | ✅ |
| EmbedBuilder / Embed | EmbedBuilder / Embed | ✅ |
| SlashCommandBuilder | SlashCommandBuilder | ✅ |
| ButtonBuilder / ui.Button | Button / ui.Button | ✅ |
| ModalBuilder / ui.Modal | Modal / ui.Modal | ✅ |
| ActionRowBuilder / ui.View | ActionRow / ui.View | ✅ |
| Collection | Collection | ✅ |
| Events | Events | ✅ |
| REST / Routes | REST / Routes | ✅ |
| Intents | Intents | ✅ |
| Permissions | Permissions | ✅ |
| ext.commands / Cog | ext.commands / Cog | ✅ |
| ext.tasks | ext.tasks | ✅ |
Ready to build?
Create a bot account in your server settings, grab the token, and start coding.