Use Discord with OpenAI Python

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

API actions for Discord for AI assitants/agents

Language
JS
PYTHON
Framework

Get Original Webhook Message

The OpenAPI schema outlines managing webhook messages via a `GET` method, requiring `webhead_id`, `webhook_token`, and an optional `thread_redirect` for message details, including errors. Esse
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GET_ORIGINAL_WEBHOOK_MESSAGE])

Delete Original Webhook Message

Deletes the original message sent by a webhook. Accepts 'thread_id' as a query parameter. On success, returns a 204. Client errors return a detailed JSON object with error codes and messages.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_DELETE_ORIGINAL_WEBHOOK_MESSAGE])

Update Original Webhook Message

This OpenAPI endpoint updates webhook messages using a thread ID, supporting media, interactive elements, and customization with detailed error info for client handling.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_UPDATE_ORIGINAL_WEBHOOK_MESSAGE])

List Guild Scheduled Event Users

Retrieve a list of users for a scheduled event in a guild, with optional member information. Supports filtering by time and limiting the number of results. Responds with user and member detail
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_LIST_GUILD_SCHEDULED_EVENT_USERS])

Get Auto Moderation Rule

The endpoint fetches an auto-moderation rule for a guild using its ID, returning details like rule and creator IDs, event types, actions, trigger types, and exemptions, along with success or e
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GET_AUTO_MODERATION_RULE])

Delete Auto Moderation Rule

Deletes a specific auto-moderation rule in a guild by rule_id. On success, returns a 204 with no content. Client errors return a detailed error object. Requires BotToken authentication.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_DELETE_AUTO_MODERATION_RULE])

Update Auto Moderation Rule

This endpoint allows for updating guild auto-moderation rules, offering customizable triggers, actions like blocking or timeouts, and exemptions, with content checks such as keyword filtering.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_UPDATE_AUTO_MODERATION_RULE])

List Auto Moderation Rules

The endpoint provides details on auto-moderation rules for guilds, including conditions, actions, triggers, exemptions, message control, user guidelines, and content restrictions. Errors retur
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_LIST_AUTO_MODERATION_RULES])

Create Auto Moderation Rule

The `/guilds/{guild_id}/auto-moderation/rules` endpoint allows creating auto-moderation rules for a guild with a JSON configuration for rule name, events, actions, and exemptions. Responses in
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_CREATE_AUTO_MODERATION_RULE])

Update Self Voice State

This endpoint enables users to manage their voice state in a guild, allowing them to request to speak, self-suppress, or switch channels. It provides feedback on successful updates or explains
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_UPDATE_SELF_VOICE_STATE])

Search Guild Members

Search guild members by query. Limit range: 1-1000, query length: 1-100 characters. Returns member info including status, roles, join date, etc. Supports bot token authentication. Error respon
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_SEARCH_GUILD_MEMBERS])

Get Active Guild Threads

Endpoint retrieves active threads within a specified guild, including thread details and member info. Returns thread lists, members associated, and pagination details. Supports error handling
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GET_ACTIVE_GUILD_THREADS])

Update My Guild Member

Endpoint allows updating a member's info in a guild, including nickname and avatar. Requires JSON with optional fields. Returns member's updated info and status or error messages.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_UPDATE_MY_GUILD_MEMBER])

Add Guild Member Role

This endpoint assigns a role to a guild member by their IDs. On success, it returns a 204 status without content. If there's a client error, it provides a detailed JSON error object, including
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_ADD_GUILD_MEMBER_ROLE])

Delete Guild Member Role

This endpoint allows for the removal of a role from a guild member by specifying the guild, user, and role IDs. Responses include a 204 on success or client errors with detailed Discord API er
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_DELETE_GUILD_MEMBER_ROLE])

Leave Guild

This endpoint lets a user exit a guild, sends a 204 on success, and indicates client errors with 4XX codes and detailed Discord error objects. A BotToken is needed for security.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_LEAVE_GUILD])

Get Application Command

This endpoint fetches details of a specific application command, including properties, options, and permissions in JSON. Errors return with codes and descriptions. Security needs a Bot token o
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GET_APPLICATION_COMMAND])

Delete Application Command

Delete a specific application command by ID. Returns a 204 on success, or a client error with a detailed JSON object for errors. Supports both BotToken and OAuth2 authentication methods.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_DELETE_APPLICATION_COMMAND])

Update Application Command

This endpoint lets users update application commands including names, options, and permissions. It supports localization, different structures, and NSFW settings, providing update confirmation
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_UPDATE_APPLICATION_COMMAND])

List Application Commands

This endpoint fetches commands for an app, optionally filtering by localization. Responses include command details or null. Allows filtering, requires authentication. Errors include a code and
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_LIST_APPLICATION_COMMANDS])

Create Application Command

This OpenAPI endpoint allows creating application commands with features like chat inputs, user commands, localization, diverse data types, sub-commands, customizable permissions, and efficien
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_CREATE_APPLICATION_COMMAND])

Create Interaction Response

The API endpoint facilitates responses with text, embeds, and controls using IDs and tokens. It supports various content types, ensures security with bot tokens, delivers clear error messages,
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_CREATE_INTERACTION_RESPONSE])

Get Thread Member

This API endpoint fetches details of a thread member in a channel, offering optional in-depth member data. It returns ID, user ID, join date, and roles, with errors following Discord's standar
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GET_THREAD_MEMBER])

Add Thread Member

This endpoint allows for adding a member to a thread in a channel, specified by `channel_id` and `user_id`. Responses include a `204` for success, or a `4XX` client error with details. Require
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_ADD_THREAD_MEMBER])

Delete Thread Member

This endpoint allows for the removal of a member from a thread within a given channel. Successful deletion returns a 204 status, while client errors yield detailed error messages. Security req
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_DELETE_THREAD_MEMBER])

List Thread Members

Retrieve thread members by channel ID with optional filters and pagination. Supports boolean queries, limits, and cursor adjustments. Returns member objects or error codes and messages.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_LIST_THREAD_MEMBERS])

Set Channel Permission Overwrite

The endpoint sets channel permission overwrites via `PUT`, requiring `type`, `allow`, `deny` in JSON; it returns `204` on success or `4XX` with error details.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_SET_CHANNEL_PERMISSION_OVERWRITE])

Delete Channel Permission Overwrite

Deletes a permission overwrite for a channel, identified by `channel_id` and `overwrite_id`. On success, returns a 204 response. If there's a client error, returns details of the Discord API e
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_DELETE_CHANNEL_PERMISSION_OVERWRITE])

Add Group Dm User

Endpoint allows adding a user to a DM group on Discord. Requires an access token, with optional nickname. Responds with channel details on success or error messages for client errors.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_ADD_GROUP_DM_USER])

Delete Group Dm User

This endpoint allows for deleting a recipient from a group DM in Discord. It responds with a 204 on success or a client error with detailed API error messages. Auth required.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_DELETE_GROUP_DM_USER])

Follow Channel

This endpoint lets a user follow a channel using JSON, returning the channel and webhook IDs on success. It uses Discord error codes for client errors and requires BotToken for authentication.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_FOLLOW_CHANNEL])

Get Message

The OpenAPI schema outlines an endpoint for fetching a Discord message using `channel_id` and `message_id`, detailing message info like type, content, and author upon success. It supports mult
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GET_MESSAGE])

Getmessage

The OpenAPI schema outlines an endpoint for fetching a Discord message using `channel_id` and `message_id`, detailing message info like type, content, and author upon success. It supports mult
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GETMESSAGE])

Delete Message

Delete a message in a channel by its IDs. Returns a 204 on success or client error with detailed JSON response for issues. Requires BotToken.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_DELETE_MESSAGE])

Update Message

The endpoint enables message updates in Discord, including content, embeds, flags, etc., through patch requests. It supports JSON/form data and demands error handling and permissions for custo
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_UPDATE_MESSAGE])

List Messages

The OpenAPI schema outlines an endpoint for managing messages in channels by ID, allowing message queries based on position and limiting returns. It includes message details and handles errors
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_LIST_MESSAGES])

Create Message

This OpenAPI endpoint enables creating messages in a Discord channel, supporting text, images, embeds, and attachments. It allows mentions, interactive components, and follows Discord API stan
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_CREATE_MESSAGE])

List Channel Webhooks

This endpoint fetches webhooks for a `{channel_id}`, returning an array of webhook objects or null, with fields like `application_id`, `name`, `type`, etc. Response codes are `200` (success) a
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_LIST_CHANNEL_WEBHOOKS])

Create Webhook

This endpoint enables webhook creation in a channel using a POST request, requiring a name and optional avatar. It returns details on success or a Discord error code if failed.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_CREATE_WEBHOOK])

List Channel Invites

This endpoint fetches invite objects for a channel, encompassing users, bots, guilds, and more, for various joining purposes. Errors yield detailed client responses.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_LIST_CHANNEL_INVITES])

Create Channel Invite

This endpoint allows users to create customizable channel invites with settings for duration, usage limits, temporary memberships, and specific channel types, including response schemas for su
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_CREATE_CHANNEL_INVITE])

Create Thread

This endpoint allows creating a Discord thread in a channel, supporting JSON and form-data with options like name, auto-archive, and rate limits. It returns thread details or error messages fo
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_CREATE_THREAD])

Trigger Typing Indicator

Trigger a typing indicator in a specified channel. Responds with 200 or 204 on success, and detailed client error for 4XX codes. Requires bot token for authentication.
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_TRIGGER_TYPING_INDICATOR])

Pin Message

Endpoint pins a message in a channel with a `PUT` request to `/channels/{channel_id}/pins/{message_id}`, responding with a 204 status code on success. Errors provide detailed issue description
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_PIN_MESSAGE])

Unpin Message

This endpoint deletes a message by ID in a channel, requiring BotToken for authentication. It returns a 204 status on success or a detailed JSON error for client issues, including codes and me
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_UNPIN_MESSAGE])

List Pinned Messages

This OpenAPI endpoint retrieves pinned messages in a channel, specified by `channel_id`, including message details like ID, content, and author. It efficiently handles client errors with descr
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_LIST_PINNED_MESSAGES])

Get Webhook Message

This endpoint fetches a webhook-sent message using webhook ID, token, and message ID. Optionally, a `thread_id` can specify the thread. It returns message details and error details if any issu
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GET_WEBHOOK_MESSAGE])

Delete Webhook Message

This endpoint deletes a webhook-sent message, optionally using a `thread_id`. Success results in a 204 response, while failures return detailed error objects with Discord-specific codes and me
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_DELETE_WEBHOOK_MESSAGE])

Update Webhook Message

This schema outlines a webhook message update endpoint, supporting PATCH requests. It allows editing message text, components, attachments, and mentions, with detailed error and security (incl
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_UPDATE_WEBHOOK_MESSAGE])

Execute Github Compatible Webhook

The `/webhooks/.../github` endpoint accepts POST from GitHub webhooks, handling actions like comments and issues with `wait` and `thread_id` parameters. It either returns a 204 status or a cli
from composio_openai import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_EXECUTE_GITHUB_COMPATIBLE_WEBHOOK])

Frequently asked questions

What is Composio.dev?

Composio.dev is a cutting-edge framework for building AI applications, designed to make the process of developing AI solutions super easy and fun! It's a collection of powerful tools and libraries that simplify the process of creating AI applications, 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, making it a breeze to leverage its capabilities within the Composio.dev platform. You can use Discord to call functions on various platforms like Google, GitHub, and others, allowing you to incorporate different services into your AI applications with ease. It also supports user login via OAuth2 and can work with other popular frameworks such as LangChain and CrewAI, giving you the flexibility to build truly innovative AI solutions.

What models can I use with Discord and openAI_python?

When using Discord and openAI_python, 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 with openAI_python?

Integrating Discord with openAI_python is super easy with Composio.dev! You can use the Composio.dev API to call functions from both Discord and openAI_python, allowing you to tap into their capabilities with just a few lines of code. The SDK is available in Python, JavaScript, and TypeScript, so you can work with the language you're most comfortable with and integrate these powerful tools into your projects seamlessly.

What is the pricing for Discord and openAI_python?

Both Discord and openAI_python are completely free to use, with a generous free tier that allows up to 1000 requests per month. This makes them accessible for developers and organizations of all sizes, whether you're a student working on a personal project or a startup building the next big thing. You can get started with these powerful tools without worrying about breaking the bank.

What kind of authentication is supported for Discord and openAI_python?

Discord and openAI_python support OAuth2 authentication, ensuring secure and authorized access to their functionalities. You can use the Composio.dev API to handle authentication and call functions from both Discord and openAI_python 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 both Discord and openAI_python, enabling you to leverage their 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 these powerful tools to your project with ease.

What is the accuracy of Discord and openAI_python?

Discord and openAI_python are 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. The 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 and openAI_python?

Discord and openAI_python can be used for a wide range of AI applications, making them versatile tools for developers and creators alike. Some common use cases include natural language processing, text generation, question answering, sentiment analysis, and more. They're 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, these tools 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.

Can I customize Discord and openAI_python for my specific needs?

Absolutely! Discord and openAI_python are highly customizable and extensible, allowing you to tailor their functionality, models, and configurations to meet your specific requirements. Whether you're building a chatbot, a content creation tool, or any other AI-powered application, you can customize these tools to fit your unique needs. Additionally, Composio.dev provides a flexible platform for integrating and orchestrating various AI tools and services, enabling you to create custom AI solutions that are tailored to your project.

What kind of support and documentation is available for Discord and openAI_python?

Discord and openAI_python have comprehensive documentation and a supportive community, making it easy for you to get started and find answers to your questions. Composio.dev also provides extensive resources, including tutorials, guides, and a dedicated support team to assist you throughout your AI development journey. Whether you're a beginner or an experienced developer, you'll have access to the resources you need to make the most of these powerful tools.
+ 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🧪