Skip to main content

Discord

Discord is a powerful communication platform that allows you to connect with friends, communities, and teams. It offers a range of features for team collaboration, including text channels and voice channels.

With a Discord account or bot, you can:

  • Send messages: Send messages to a specific channel
  • Get messages: Get messages from a specific channel
  • Get server: Get information about a specific server
  • Get user: Get information about a specific user

In Klyntos, the Discord integration enables your agents to access and leverage your organization's Discord servers. Agents can retrieve information from Discord channels, search for specific users, get server information, and send messages. This allows your workflows to integrate with your Discord communities, automate notifications, and create interactive experiences. Discord components in Klyntos use efficient lazy loading, only fetching data when needed to minimize API calls and prevent rate limiting. Token refreshing happens automatically in the background to maintain your connection.

Setting Up Your Discord Bot​

  1. Go to the Discord Developer Portal
  2. Create a new application and navigate to the "Bot" tab
  3. Create a bot and copy your bot token
  4. Under "Privileged Gateway Intents", enable the Message Content Intent to read message content
  5. Invite your bot to your servers with appropriate permissions

Usage Instructions​

Integrate Discord into the workflow. Can send and get messages, get server information, and get a user’s information. Requires bot API key.

Tools​

discord_send_message​

Send a message to a Discord channel

Input​

ParameterTypeRequiredDescription
botTokenstringYesThe bot token for authentication
channelIdstringYesThe Discord channel ID to send the message to
contentstringNoThe text content of the message
serverIdstringYesThe Discord server ID (guild ID)

Output​

ParameterTypeDescription
messagestringSuccess or error message
dataobjectDiscord message data

discord_get_messages​

Retrieve messages from a Discord channel

Input​

ParameterTypeRequiredDescription
botTokenstringYesThe bot token for authentication
channelIdstringYesThe Discord channel ID to retrieve messages from
limitnumberNoMaximum number of messages to retrieve (default: 10, max: 100)

Output​

ParameterTypeDescription
messagestringSuccess or error message
messagesarrayArray of Discord messages with full metadata

discord_get_server​

Retrieve information about a Discord server (guild)

Input​

ParameterTypeRequiredDescription
botTokenstringYesThe bot token for authentication
serverIdstringYesThe Discord server ID (guild ID)

Output​

ParameterTypeDescription
messagestringSuccess or error message
dataobjectDiscord server (guild) information

discord_get_user​

Retrieve information about a Discord user

Input​

ParameterTypeRequiredDescription
botTokenstringYesDiscord bot token for authentication
userIdstringYesThe Discord user ID

Output​

ParameterTypeDescription
messagestringSuccess or error message
dataobjectDiscord user information

Notes​

  • Category: tools
  • Type: discord