LogoLogo
PlaygroundVideosBlogPricing
  • Welcome
  • Convai Playground
    • Playground Walkthrough
    • Get Started
    • Character Creator Tool
      • Create Character
      • Language and Speech
      • Knowledge Bank
      • Personality and Style
      • State of Mind
      • Memory
      • Actions
      • Narrative Design
      • Character Versioning
    • F.A.Q
  • Plugins & Integrations
    • Introduction
    • Unity Plugin
      • Pre-Requisites
      • Compatibility
      • Downloads
        • Limitations of WebGL Plugin
      • Setting Up Unity Plugin
      • Troubleshooting Guide
        • Disable Assembly Validation
        • Missing Newtonsoft Json
        • Microphone Permission Issues
        • Default Animations Incompatibility
        • Animations have Facial Blendshapes
        • Jaw Bone in Avatar is not Free
        • macOS Permission Issues
      • Creating a Convai Powered Scene from Template
      • Importing Ready Player Me (RPM) Characters
      • Importing Custom Characters
      • Adding Actions to your Character
      • Adding Lip-Sync to your Character
      • Adding Narrative Design to your Character
        • Narrative Design Keys
      • Adding NPC to NPC Conversation
      • Adding Scene Reference and Point-At Crosshairs
      • Utilities
        • Character Emotion
        • Player Data Container
        • Long Term Memory
        • Language Support
        • Managing sessionID Locally
        • Transcript UI System
        • Pre-built UI Prefabs
        • Input Management
        • Notification System
        • Settings Panel
        • Dynamic Information Context
      • Building For Supported Platforms
        • Building for iOS/iPadOS
        • Building for WebGL
        • Convai XR
          • Building for VR
            • VR Automatic Installation
            • VR Manual Installation
          • Building for MR
            • MR Automatic Installation
            • MR Manual Installation
          • Building for AR
          • Interacting with XR UI Elements
        • Building for macOS Universal apps
      • Changelogs
      • Tutorials
        • Narrative Design
        • NPC2NPC
    • Unreal Engine
      • Supported Platforms
      • Installation
      • Guides
        • Dynamic Environment Info
        • Change AI Character Movement Speed
        • Integration with Pixel Streaming
        • Adjust Interaction Radius
        • Creating MetaHuman Characters
          • Adding MetaHuman
          • Adding LipSync to MetaHuman (From plugin version 3.0.0 or later )
          • Change the Parent Class for MetaHuman
          • Change the parent class for Player.
          • Adding LipSync to MetaHuman (Deprecated)
        • Creating ReadyPlayerMe Characters
          • Download Plugins
          • Adding ReadyPlayerMe Character
          • Change the parent class for Player.
        • Creating Reallusion Characters
          • Creating a Reallusion Character
          • Importing Reallusion character and setting up the Convai plugin
          • Binding objects to Reallusion Character
        • Event-Aware Convai Characters
        • Operations Based on the Presence of Certain Words
        • Narrative Design
          • Narrative Design Trigger
          • Narrative Design Keys
        • Actions Guide
          • Stage 1: Default Actions
            • Moves To
            • Follows
          • Stage 2: Custom Actions
            • Simple actions
            • Adding Descriptions to Actions
          • Stage 3: Custom Actions with Single Parameter
          • Main Character and Attention Object
        • Customization
          • Push to Talk
          • Alter Character Response Audio Rate
        • Speech To Text Transcription
        • Enable Multiplayer Support
        • 3D Chat Widget
        • Long Term Memory
        • Saving and Loading Session
      • Blueprints Reference
        • Convai Player
        • Convai Chatbot
        • Convai Environment
        • Convai Object Entry
        • Convai Result Action
        • Convai Extra Params
        • Speech To Text
        • Text To Speech
        • Utility Functions
      • Troubleshoot Guide
        • Missing Unreal Engine Tool Set in Microsoft Visual Studio Toolchain
        • Convai Module Not Found
        • MetaHuman Plugin Conflict
        • Failure to Load Character IDs
      • Microphone Settings
        • Set Audio Gain
        • Set Microphone
        • Microphone test
        • List Microphone Devices
      • Mac Microphone Permission: Required for UE 5.0 and 5.3
      • Guides V2 (Under Development)
        • Getting Started
          • Installation
          • Simple Talking Cube
          • Adding Premade Chat and Settings UI
    • Web Plugin
      • PlayCanvas Plugin
        • Adding External Script
        • First Person View
        • Adding characters to scene
        • Character Animations
        • Convai Integration
        • Chat Overlay
      • Convai Web SDK
        • Getting Started
        • Facial Expressions
        • Actions
      • JavaScript Chat UI SDK
        • Getting Started
        • ChatBubble Props
      • Narrative Design Guide
        • Narrative Design Triggers
        • Narrative Design Keys
      • GLB Characters for Convai
      • GLB/FBX animations for Convai
    • Modding Framework
      • Modding Cyberpunk 2077
    • Other Integrations
      • Roblox
        • Sample Game 1
        • Sample Game 2
        • Code Example
          • Character Conversation API
      • Discord
        • Create a Discord Bot
        • Hosting Discord Bot from Personal Server
        • Hosting Discord Bot from Replit
      • Omniverse Extension
      • Third-Party API Integrations
        • ElevenLabs API Integration
    • Convai Pixel Streaming Embed
      • Whitelisting & Publishing an Experience
      • React Typescript
      • ReactJS (JavaScript)
      • Vanilla JavaScript (ES Modules)
      • CDN (UMD Script)
      • On Premise Deployment
      • API Reference
  • Reference
    • Core API Reference
      • Character Base API
      • Interaction API
      • Core AI Setting API
      • Backstory API
      • Chat History API
      • Knowledge Bank API
      • Narrative Design API
      • Action API
      • Language List API
      • Voice List API
      • Character List API
      • Evaluation API
Powered by GitBook
On this page

Was this helpful?

  1. Plugins & Integrations
  2. Other Integrations
  3. Discord

Hosting Discord Bot from Personal Server

Successfully host a Discord Bot server connected with Convai API

PreviousCreate a Discord BotNextHosting Discord Bot from Replit

Last updated 1 year ago

Was this helpful?

Here we list out the steps to successfully host a discord bot server and update the required details to allow users to effectively communicate with the character created.

The current version has support for only Python language. We are striving to include support for servers in other languages also. Please, reach out to us at support@convai.com if you have any queries on this.

Code Link:

Steps:

  1. Visit the link given above and clone the repository in your system, where you want to host the server.

  2. Go to your system and open Terminal

  3. Insert the following commands:

    $ git clone https://github.com/Conv-AI/Convai_Discord_Integration.git
    
    $ cd Convai_Discord_Integration
    
    $ cd python/
  4. We are now inside the python folder that has the necessary code.

  5. We need to edit the .env file to update it with the required credentials. Open the .env file to edit and enter the necessary details.

    # The unique token generated by Discord for your bot
    DISCORD_BOT_TOKEN=<the token that we received from Step 13 while creating Discord Bot>
    
    # Unique API Key received after creating an account with Convai.
    CONVAI_API_KEY=<the unique key you get once you sign-up with Convai>
    
    # The character-id of the new character created with Convai
    CONVAI_CHARACTER_ID=<a unique id to identify the character that we got while creating the character in Convai website>
    
    # The URL to get back a response from the Convai server for every query
    CHARACTER_GET_RESPONSE_URL=https://api.convai.com/character/getResponse
    
    # Enable voice response to generate audio files to be played in the voice channel. Current WIP
    ENABLE_VOICE_RESPONSE=False
    
    # List out all the channels you want the bot to respond to, separated by commas ','
    # ALLOWED_CHANNELS=welcome,general,...
    ALLOWED_CHANNELS= <leave it empty if you want the bot to respond to all channels>
  6. With this, we are set to start our server, just run the following command:

    $ python main.py
  7. Now the bot should be running perfectly. You should see some log like this, that indicates that the bot is up.

    Note: Here ConvaiBot is the name that we gave. The name of your bot will appear there in place of ConvaiBot.

And we are done. Your bot is up. Keep it running for it to be able to interact with the users.

If you have some problem with hosting it, do reach out to us at support@convai.com and we will get back to you soon.

Convai is looking into solutions for hosting the server bot for you so that you do not have to go through the whole hassle in the above steps. We will keep on updating the docs as soon as we have some updates.

Github