Skip to Content

Discord Integration

Slash commands और direct messages का उपयोग करके अपने agent को Discord servers में जोड़ें।

अवलोकन

Discord integration प्रदान करती है:

  • Slash command support (/ask)
  • Direct message conversations
  • Server-wide availability
  • Channel-specific responses
  • Rich embed formatting
  • Optional text-based DMs (कोई command prefix की जरूरत नहीं)

पूर्व-आवश्यकताएं

  • एक Discord account
  • Target server पर Manage Server permissions
  • Discord Developer Portal access

Setup Steps

1. Discord Application बनाएं

  1. Discord Developer Portal पर जाएं
  2. New Application पर क्लिक करें
  3. नाम दर्ज करें (जैसे, “My Support Bot”)
  4. Create पर क्लिक करें

2. अपने Credentials प्राप्त करें

Discord Developer Portal से ये values collect करें:

Fieldविवरणकहाँ मिलेगा
Application IDआपके Discord app का IDGeneral Information page
Public KeySignature verification के लिए 64-character hex stringGeneral Information page
Bot Tokenआपके bot का secret tokenBot section → Reset Token
Guild ID (optional)Instant command registration के लिए Server IDRight-click server → Copy Server ID

अपने Bot Token को सुरक्षित रखें — इसे कभी भी publicly share न करें। आपके token वाला कोई भी व्यक्ति आपके bot को control कर सकता है।

3. Cuneiform Chat से Connect करें

  1. Agents में जाएं → अपना agent चुनें
  2. Integrations tab पर जाएं
  3. Discord पर क्लिक करें
  4. अपना Application ID, Public Key, और Bot Token दर्ज करें
  5. Instant slash command registration के लिए optionally Guild ID दर्ज करें
  6. Connect पर क्लिक करें

4. Webhook URL Configure करें (जरूरी)

Connect करने के बाद, आपको अपना Webhook URL दिखेगा:

  1. Success dialog से Webhook URL copy करें
  2. Discord Developer Portal में, General Information पर जाएं
  3. Interactions Endpoint URL खोजें
  4. Webhook URL paste करें और Save Changes पर क्लिक करें

यह step जरूरी है। Discord इस URL का उपयोग आपके bot को slash command interactions भेजने के लिए करता है।

5. Bot को अपने Server में जोड़ें

Integration card पर Add to Server button का उपयोग करें, या connection के बाद provide किए गए invite URL का उपयोग करें। यह bot को required permissions के साथ जोड़ता है।

Bot का उपयोग करना

Slash Commands

Users /ask slash command का उपयोग करके आपके bot के साथ interact करते हैं:

/ask What are your business hours?

Bot question process करता है और channel में respond करता है।

Direct Messages

Private conversations के लिए bot को directly message करें:

  1. अपने server की member list में bot खोजें
  2. Right-click करें और Message चुनें
  3. /ask command का उपयोग करें या Text DMs enable करें (नीचे देखें)

Text DMs Toggle

Integration card पर Text DMs switch direct message behavior control करता है:

  • Off (default): Users को DMs में /ask command का उपयोग करना होगा
  • On: Users DMs में plain text messages भेज सकते हैं (कोई command prefix की जरूरत नहीं)

Text DMs enable करते समय, आपको Discord Developer Portal → Bot section → Privileged Gateway Intents में Message Content Intent enable करना होगा।

Response Format

Responses rich embeds के रूप में दिखती हैं जिनमें:

  • Answer text
  • Source references (optional)
  • आपके bot की branding

Features

Server-Wide Access

एक बार जोड़ने के बाद, bot उन सभी text channels में उपलब्ध है जहाँ इसके permissions हैं।

Thread Support

Bot threads में respond कर सकता है, conversations को organized रखता है।

Instant vs Global Commands

  • Guild ID के साथ: Slash commands उस server में instantly register होते हैं
  • Guild ID के बिना: Global commands को propagate होने में 1 घंटे तक लग सकते हैं

Instant slash command availability के लिए setup के दौरान Guild ID provide करें। आप बाद में और servers जोड़ सकते हैं।

अपना Bot Manage करना

प्रत्येक connected bot दिखाता है:

  • Bot username और status (Active/Error)
  • Application ID
  • Associated agent
  • Last activity timestamp
  • Webhook URL (reference के लिए)

उपलब्ध Actions

Actionविवरण
Add to ServerBot को server में जोड़ने के लिए invite link खोलता है
Portalइस app के लिए Discord Developer Portal खोलता है
Copy URLWebhook URL copy करता है
Test ConnectionBot connectivity verify करता है
Disconnectयह integration हटाता है

Troubleshooting

Bot Respond नहीं कर रहा

  1. Verify करें कि Discord Developer Portal में Interactions Endpoint URL configured है
  2. Confirm करें कि bot के पास channel में permissions हैं
  3. Check करें कि Cuneiform Chat में token सही है
  4. Test करें कि slash commands registered हैं (/ से आपका command दिखता है)

Commands नहीं दिख रहे

Slash commands को globally register होने में एक घंटे तक लग सकते हैं। Immediate testing के लिए:

  • Instant registration के लिए setup के दौरान Guild ID provide करें
  • अगर Guild ID नहीं था तो global propagation का wait करें

Permission Errors

Ensure करें कि bot के पास ये permissions हैं:

  • Send Messages
  • Use Slash Commands
  • Embed Links
  • Read Message History (thread support के लिए)

Text DMs काम नहीं कर रहे

  1. Verify करें कि integration card पर Text DMs toggle enabled है
  2. Discord Developer Portal → Bot section में Message Content Intent enable करें
  3. जरूरत पड़ने पर bot connection restart करें

Security

  • Bot tokens encrypted और सुरक्षित रूप से stored हैं
  • Commands Discord के built-in signature verification का उपयोग करते हैं
  • Direct interactions से परे कोई server data access नहीं होता

Disconnect करना

Discord integration हटाने के लिए:

  1. Agents में जाएं → Agent चुनें → Integrations
  2. अपने Discord bot पर three-dot menu पर क्लिक करें
  3. Disconnect चुनें

Bot को Discord से पूरी तरह हटाने के लिए:

  1. अपने Discord server settings पर जाएं
  2. Integrations पर जाएं → Bot हटाएं
Last updated on