Discord Agent
This section describes how to build an Agent which can talk in Discord voice and chat.
In this guide, we build an Agent named "Nimbus" which can talk on Discord - It would be able to discuss hot topics in text channels, and even be able to talk in voice channels.
The source code for this example is available on GitHub.
Video Tutorial
You can follow along this example by watching the video below:
Guide
Step 1: Setup usdk
Follow Setup the SDK to set up NodeJS and usdk
.
Step 2: Create an Agent using the Interview process
Run usdk create <your-agent-directory>
to start the interview process.
Now it will ask for a Discord bot token and the channel you want the bot to join.
This tutorial will not cover how to obtain Discord tokens. For more information on how to build Discord bots, you can refer to the Discord Component's documentation. You can also request our agent to guide you through obtaining tokens. Simply use the prompt below, and it will provide a step-by-step process.
Once you obtain the tokens, complete the rest of the interview.
Step 3: Test "Nimbus"
You can run usdk chat
to test Nimbus out. Learn more
Step 4: (optional) Edit the Agent Custom Responses and Personality
After testing, you might want to customize Nimbus for tailored interactions or give her a distinct personality.
Run usdk edit
to edit Nimbus through the interview process.
Test Nimbus again. Ask her:
Hey Nimbus , Introduce yourself in XYZ channel?
Share the response in our Discord community; we'd love to know what she responds to you.
Further Challenges
- Create a
!poll
command using Nimbus that takes a question and generates a poll with reactions (e.g., ✅ for yes, ❌ for no). - Add a
!remind
command where users can set reminders - Send a fun fact to a specific channel daily