airiPlatform IntegrationsDiscord Bot

Talk with AIRI on Discord

AIRI can participate in your Discord community just like any human friend, responding in voice channels and text chats.

What You Can Do (Function-First)

ScenarioUser ActionResult
Summon in VoiceType /summon while connected to a voice channelAIRI joins, greets the room, and listens for speech
Private DMOpen a DM with the botChat one-on-one; messages appear with Markdown formatting
Slash Commands/ping, /model switch llama3Quick tooling to check latency or change LLM
Leave Channel/byeBot disconnects politely

Tip: AIRI uses the same Character Card so the personality feels identical to the desktop pet.

Quick Setup (2 Minutes)

  1. Go to Settings → Integrations → Discord in the desktop app.
  2. Click Generate Bot (one-click script) or paste an existing Bot Token.
  3. Follow the OAuth link to add the bot to your server with Send Messages, Read Messages, Connect, Speak permissions.
  4. In any voice channel, type /summon — AIRI joins and starts chatting!

How It Works (Conceptual)

  1. Voice Gateway@discordjs/voice streams Opus audio from Discord to the AIRI Discord service.
  2. Audio Converter — The bot converts Opus → PCM → WAV before sending to the same VAD/STT pipeline used on desktop.
  3. Unified LLM Brain — The text goes to the central LLM; the response comes back.
  4. TTS & Playback — The reply is chunked, synthesized, then streamed back into the voice connection.
  5. Slash Command Interface — Simple REST helpers register /summon, /bye, /ping, /model on startup.

Sequence Diagram:

Best Practices

  • Use a Music or AI voice channel to avoid noise in main lobbies.
  • For privacy, switch the STT provider to local Whisper; audio never leaves your server.
  • The bot auto-disconnects after 5 minutes of silence to save resources.

Functional RoleCode FileDescription
Discord Bot Entryservices/discord-bot/src/index.tsInitializes client, registers slash commands
Voice Pipelineservices/discord-bot/src/pipelines/tts.tsHandles Opus ↔ WAV, STT, TTS
Command Handlersservices/discord-bot/src/commands/*.ts/summon, /bye, /ping implementations
Provider Bridgepackages/server-sdk/src/client.tsWebSocket link to central LLM service