Use discord with AI Agents

An instant messaging and VoIP social platform.
🔗 Connect and Use discord
1. 🔑 Connect your discord account
2. ✅ Select an action
3. 🚀 Go live with the agent
What do you want to do?
Actions
- GET MY OAUTH2 APPLICATION
important

API actions for discord for AI assitants/agents

Language
JS
PYTHON

LIST GUILD ROLES

This endpoint retrieves a list of roles for a guild identified by `guild_id`. Each role includes details such as id, name, permissions, and appearance settings. Responds with role information
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_LIST_GUILD_ROLES])

CREATE GUILD ROLE

This text outlines the process for creating a guild role through Discord's API, specifying required fields such as name and permissions, and optional ones like icon. It returns role details or
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_CREATE_GUILD_ROLE])

PREVIEW PRUNE GUILD

The `/guilds/{guild_id}/prune` endpoint previews the count of inactive guild members eligible for pruning, based on inactivity within 1-30 days and optional role exclusions.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_PREVIEW_PRUNE_GUILD])

PRUNE GUILD

The `/guilds/{guild_id}/prune` endpoint prunes inactive guild members within 1-30 days and can compute prune counts and include roles in the check, returning the number pruned or errors.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_PRUNE_GUILD])

GET GUILD BAN

"Gets info on a banned user from a guild by ID. Returns user details like id, username, and ban reason. Handles 200 responses and client errors under 4XX."
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GET_GUILD_BAN])

BAN USER FROM GUILD

The `/guilds/{guild_id}/bans/{user_id}` endpoint bans a user from a guild, allowing message deletion timing as seconds (0-604800) or days (0-7). It returns 204 on success or a 4XX error. Secur
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_BAN_USER_FROM_GUILD])

UNBAN USER FROM GUILD

This endpoint, `/guilds/{guild_id}/bans/{user_id}`, allows for unbanning a user from a guild. On success, it returns a 204 response. If an error occurs, a client error response is issued, deta
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_UNBAN_USER_FROM_GUILD])

LIST GUILD BANS

This endpoint lists bans in a guild. Parameters: 'limit' (1-1000), 'before', 'after' (snowflake format). Returns user ban info including ID, username, and reason. Supports pagination through '
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_LIST_GUILD_BANS])

GET STAGE INSTANCE

This endpoint retrieves details of a specific stage instance by channel ID, including guild ID, topic, privacy level, and associated event ID. Returns stage instance info in JSON format and ha
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GET_STAGE_INSTANCE])

DELETE STAGE INSTANCE

This endpoint deletes a stage instance using a `channel_id`, returning a 204 status for success or a 4XX error with detailed messages and Discord error codes. Security is BotToken.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_DELETE_STAGE_INSTANCE])

GET APPLICATION

This endpoint retrieves application details by ID, including its name, icon, description, bot details, and other specific attributes. Returns data in JSON, with potential client error response
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GET_APPLICATION])

UPDATE APPLICATION

Endpoint allows updating application details, including description, icons, team ID, flags, interaction URLs, and more. Supports patching application JSON data, with responses for successful u
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_UPDATE_APPLICATION])

GET WEBHOOK BY TOKEN

This endpoint retrieves a webhook by its ID and token, returning a JSON response with webhook details including application ID, avatar, channel and guild IDs, name, type, user information, and
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GET_WEBHOOK_BY_TOKEN])

EXECUTE WEBHOOK

The `/webhooks` endpoint enables sending messages and data with options, supporting up to 2000 characters and customization. Errors offer detailed debug information.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_EXECUTE_WEBHOOK])

DELETE WEBHOOK BY TOKEN

This endpoint allows for deleting a webhook using its ID and token, responding with 204 upon success or a detailed error object for client errors (4XX).
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_DELETE_WEBHOOK_BY_TOKEN])

UPDATE WEBHOOK BY TOKEN

This API endpoint updates a webhook's name and avatar, returning details like application ID and type for successful updates, and emits client error responses for failures.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_UPDATE_WEBHOOK_BY_TOKEN])

GET STICKER

Fetches details for a specific sticker by ID, supporting both types: STANDARD (official/Nitro) and GUILD (guild-exclusive). Responses may include sticker format (PNG/APNG/LOTTIE/GIF), availabi
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GET_STICKER])

GET WEBHOOK

Fetches details about a specific webhook by its ID, highlighting possible webhook types. Returns either webhook info or error messages for client errors.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GET_WEBHOOK])

DELETE WEBHOOK

This endpoint removes a specified webhook using its ID, yielding a 204 status if successful. If it fails, a detailed error message and code are provided. Execution needs a BotToken for securit
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_DELETE_WEBHOOK])

UPDATE WEBHOOK

This endpoint modifies a webhook's name, avatar, and channel ID, requiring specific formats and a `BotToy539324699079` token for authentication. It accepts strings/null for the avatar and prov
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_UPDATE_WEBHOOK])

GET CHANNEL

This GET endpoint fetches a channel by ID, supporting diverse types like direct messages and guild channels, providing details like message history. Errors return with descriptive codes/messag
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GET_CHANNEL])

DELETE CHANNEL

This API endpoint deletes a channel using `{channel_id}`, returning a `200` and JSON structure based on channel type. It identifies client errors with `4XX` codes for issues like invalid input
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_DELETE_CHANNEL])

UPDATE CHANNEL

This patch endpoint updates a channel's details, supporting modification of properties like name, icon, type, position, and more, with detailed schema for error handling.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_UPDATE_CHANNEL])

INVITE RESOLVE

This API endpoint fetches details of an invite by code, possibly including counts and guild event info, based on query parameters. It returns invite type, code, inviter, expiration, guild/chan
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_INVITE_RESOLVE])

INVITE REVOKE

This endpoint cancels an invite using a unique code for entities like guilds or channels, returning JSON details like invite type and inviter info. It requires BotToken authentication and issu
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_INVITE_REVOKE])

GET GUILD

Retrieve guild details including ID, name, icon, and features. Supports query parameter `with_counts` for member and presence counts. ApiResponse includes guild properties, roles, emojis, and
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GET_GUILD])

DELETE GUILD

This endpoint deletes a guild by ID, returning a 204 on success. Client errors yield detailed error messages with codes. A BotToken is needed for security.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_DELETE_GUILD])

UPDATE GUILD

This PATCH endpoint updates guild settings like name, region, and more, returning updated details or structured errors upon failure.
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_UPDATE_GUILD])

GETUSER

Fetch a user's details by their user_id. Responds with user info including id, username, and various optional fields like avatar, bot status. Handles errors with detailed messages. Requires Bo
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GETUSER])

Important

GET USER

Fetch a user's details by their user_id. Responds with user info including id, username, and various optional fields like avatar, bot status. Handles errors with detailed messages. Requires Bo
from composio_langchain import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GET_USER])

Frequently asked questions

What is Composio.dev?

Composio.dev is a platform for building AI applications, designed to make the process of developing AI solutions super easy and fun! It provides a comprehensive set of tools and libraries that simplify the process of developing AI solutions, allowing you to focus on the creative aspects of your project without getting bogged down by the technical details.

How does Composio.dev support discord?

Composio.dev seamlessly integrates with discord, allowing you to leverage its capabilities within the Composio.dev platform. You can utilize discord to call functions across various platforms, including Google, GitHub, and others, making it a breeze to incorporate different services into your AI applications. Additionally, it supports user authentication via OAuth2 and can work in conjunction with other popular frameworks like LangChain and CrewAI, giving you the flexibility to build truly innovative AI solutions.

What models can I use with discord?

With discord, you have access to a wide range of state-of-the-art language models, including GPT-4o (OpenAI), GPT-3.5 (OpenAI), GPT-4 (OpenAI), Claude (Anthropic), PaLM (Google), LLaMA and LLaMA 2 (Meta), Gemini, and many others. This flexibility allows you to choose the model that best suits your specific use case, whether you're building a chatbot, a content creation tool, or any other AI-powered application. You can experiment with different models and find the one that delivers the best performance for your project.

How can I integrate discord into my project?

Composio.dev provides a seamless integration for discord, making it super easy to incorporate this powerful framework into your projects. You can leverage the Composio.dev API to call functions from discord, allowing you to tap into its capabilities with just a few lines of code. The SDK is available in Python, JavaScript, and TypeScript, so you can work with your preferred programming language and integrate discord into your projects seamlessly.

What is the pricing for discord?

discord is completely free to use, with a generous free tier that allows up to 1000 requests per month. This makes it accessible for developers and organizations of all sizes to explore and experiment with this powerful tool without any upfront costs. Whether you're a student working on a personal project or a startup building the next big thing, you can get started with discord without worrying about breaking the bank.

What kind of authentication is supported for discord?

discord supports OAuth2 authentication, ensuring secure and authorized access to its functionalities. You can leverage the Composio.dev API to handle authentication and call functions from discord seamlessly. The SDK is available in Python, JavaScript, and TypeScript for your convenience, making it easy to integrate authentication into your projects and keep your users' data safe and secure.

Can I add discord to my project?

Absolutely! You can easily incorporate discord into your project by utilizing the Composio.dev API. This API allows you to call functions from discord, enabling you to leverage its capabilities within your application. The SDK is available in Python, JavaScript, and TypeScript to facilitate integration, so you can work with the language you're most comfortable with and add discord to your project with ease.

What is the accuracy of discord?

discord is designed to provide highly accurate and reliable results, ensuring that your AI applications perform at their best. The integration with Composio.dev ensures precise function calls, enabling you to build robust and powerful AI applications with confidence. discord's comprehensive framework and the ability to leverage state-of-the-art models ensure reliable and accurate outcomes for your AI development needs, whether you're working on a chatbot, a content creation tool, or any other AI-powered project.

What are some common use cases for discord?

discord can be used for a wide range of AI applications, making it a versatile tool for developers and creators alike. Some common use cases include natural language processing, text generation, question answering, sentiment analysis, and more. It's particularly useful for building chatbots, virtual assistants, content creation tools, and other AI-powered applications that can help you automate tasks, engage with users, and create compelling content. Whether you're working on a personal project or building a product for your startup, discord can help you bring your ideas to life.

How does discord handle data privacy and security?

Data privacy and security are crucial considerations when working with AI systems, and discord takes these issues seriously. It follows industry best practices and adheres to strict data protection regulations, ensuring that your data is kept safe and secure. discord provides robust security measures, such as encryption and access controls, to ensure the confidentiality and integrity of your data. You can rest assured that your sensitive information is protected when using discord for your AI development needs.
+ Integrate seamlessly with your agentic frameworks
Composio Works with All Shapes and SizesComposio Works with All Shapes and SizesComposio Works with All Shapes and SizesComposio Works with All Shapes and SizesComposio Works with All Shapes and Sizes
Building for AI across continents🧪