تخطى إلى المحتوى الرئيسي
جميع التكاملات

Discord Integration

Deploy your AI agent as a Discord bot. Slash commands and rich embeds for your community.

كيف يعمل مع Discord

Three steps to add an AI assistant to your Discord server.

Add to Server
Bot invited to server
Permissions configured
Slash commands registered

ما تحصل عليه

A powerful AI assistant for your Discord community.

Slash Commands

The bot registers /ask and /search slash commands automatically when added to your server.

Rich Embeds

Responses come as beautifully formatted Discord embeds with source links.

@Mention Support

Users can also @mention the bot in any channel it has access to.

DM Support

Users can DM the bot directly for private queries away from public channels.

إعداد سريع

Build a custom Discord bot with the TypeScript SDK.

discord-bot.ts
// Discord.js bot with InfoLens
import { InfoLensClient } from '@infolens/sdk';
import { Client, GatewayIntentBits } from 'discord.js';

const il = new InfoLensClient({ apiKey: 'pk_live_...' });
const bot = new Client({
  intents: [GatewayIntentBits.Guilds]
});

bot.on('interactionCreate', async (i) => {
  if (!i.isChatInputCommand()) return;
  const res = await il.agents.chat({
    agentId: 'ag_7f3k9x2m',
    apiKey: 'pk_live_...',
    message: i.options.getString('question')
  });
  await i.reply(res.answer);
});

الأسئلة الشائعة

هل أنت مستعد للتكامل مع Discord?

أنشئ حسابك المجاني واجعل وكيل الذكاء الاصطناعي يعمل في دقائق.