Use discord with Llamaindex 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
important

API actions for discord for AI assitants/agents

Language
JS
PYTHON
Framework

GET MY OAUTH2 APPLICATION

The endpoint fetches details of the user's OAuth2 app, such as ID, name, and bot info, also providing application features or client error messages.
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GET_MY_OAUTH2_APPLICATION])

GETMYOAUTH2APPLICATION

The endpoint fetches details of the user's OAuth2 app, such as ID, name, and bot info, also providing application features or client error messages.<<DEPRECATED use get_my_oauth2_application>>
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GETMYOAUTH2APPLICATION])

LIST MY CONNECTIONS

This endpoint fetches a user's connections list, covering integrations and friend sync settings. It shows details for types like Facebook, GitHub, and Spotify, including activity, visibility,
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_LIST_MY_CONNECTIONS])

LISTMYCONNECTIONS

This endpoint fetches a user's connections list, covering integrations and friend sync settings. It shows details for types like Facebook, GitHub, and Spotify, including activity, visibility,
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_LISTMYCONNECTIONS])

LIST MY GUILDS

This endpoint fetches the current user's guilds with pagination options ('before', 'after', 'limit') and an option for member counts, returning guilds' IDs, names, and features, including erro
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_LIST_MY_GUILDS])

LISTMYGUILDS

This endpoint fetches the current user's guilds with pagination options ('before', 'after', 'limit') and an option for member counts, returning guilds' IDs, names, and features, including erro
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_LISTMYGUILDS])

GET MY APPLICATION

This endpoint retrieves the application details of the current user. It returns an application object including id, name, icon, and more, for successful requests, and an error object for clien
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GET_MY_APPLICATION])

GETMYAPPLICATION

This endpoint retrieves the application details of the current user. It returns an application object including id, name, icon, and more, for successful requests, and an error object for clien
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GETMYAPPLICATION])

UPDATE MY APPLICATION

The `/applications/@me` PATCH endpoint allows users to update their application details like description, icon, and more, using JSON. Successful updates return a 200 status, while failures pro
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_UPDATE_MY_APPLICATION])

GET BOT GATEWAY

This endpoint retrieves the bot's gateway URL and session start limits, including shard count, max concurrency, and reset intervals. Errors return as client-related issues with detailed descri
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GET_BOT_GATEWAY])

GET PUBLIC KEYS

This endpoint retrieves public keys for OAuth2, responding with keys in JSON including properties like 'kty', 'use', 'kid', 'n', 'e', 'alg'. Handles client errors with detailed error messages.
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GET_PUBLIC_KEYS])

GETPUBLICKEYS

This endpoint retrieves public keys for OAuth2, responding with keys in JSON including properties like 'kty', 'use', 'kid', 'n', 'e', 'alg'. Handles client errors with detailed error messages.
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GETPUBLICKEYS])

GET MY OAUTH2 AUTHORIZATION

The `/oauth2/@me` endpoint fetches current OAuth2 auth info, including application, user details, and granted scopes in JSON. It handles errors structuredly and ensures security with BotToken
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GET_MY_OAUTH2_AUTHORIZATION])

GETMYOAUTH2AUTHORIZATION

The `/oauth2/@me` endpoint fetches current OAuth2 auth info, including application, user details, and granted scopes in JSON. It handles errors structuredly and ensures security with BotToken
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GETMYOAUTH2AUTHORIZATION])

LIST VOICE REGIONS

This GET endpoint at `/voice/regions` lists voice regions, including details like `id`, `name`, and flags for `custom`, `deprecated`, and `optimal` statuses. It supports 200 responses with an
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_LIST_VOICE_REGIONS])

GET MY USER

The "/users/@me" endpoint supports GET requests to fetch user details like ID, username, and avatar, among others, accommodating various locales and premium types. It offers detailed responses
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GET_MY_USER])

GETMYUSER

The "/users/@me" endpoint supports GET requests to fetch user details like ID, username, and avatar, among others, accommodating various locales and premium types. It offers detailed responses
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GETMYUSER])

UPDATE MY USER

Update the current user's profile, including username and avatar. Request must include a username (2-32 chars) and an optional avatar in base64 encoding. Returns updated user details on succes
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_UPDATE_MY_USER])

CREATE STAGE INSTANCE

Create a stage instance on Discord. Accepts a topic, channel ID, optional privacy level, guild scheduled event ID, and notification flag. Returns guild ID, topic, privacy level, and instance I
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_CREATE_STAGE_INSTANCE])

LIST STICKER PACKS

This endpoint retrieves a list of sticker packs, detailing each pack's ID, SKU, name, description, and associated stickers, including sticker IDs, names, tags, types, format, and sort values.
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_LIST_STICKER_PACKS])

GET GATEWAY

The GET endpoint '/gateway' fetches the connection URL via a 200 response JSON with 'url', and details client errors (4XX) with error codes and messages. It supports optional BotToken authenti
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GET_GATEWAY])

CREATEGUILD

Create a guild in Discord. Allows specifying guild details like name, icon, verification level, role permissions, and channels. Requires a guild name; other fields optional. Success response i
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_CREATEGUILD])

LIST MY PRIVATE ARCHIVED THREADS

This endpoint retrieves archived private threads in a channel, searchable by date or quantity (2-100), returning thread details and metadata, with error handling for client issues.
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_LIST_MY_PRIVATE_ARCHIVED_THREADS])

LIST GUILD APPLICATION COMMAND PERMISSIONS

This endpoint fetches command permissions for an application in a guild, detailing permissions by ID with support for role, user, and channel specifics, and returns errors with Discord's codes
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_LIST_GUILD_APPLICATION_COMMAND_PERMISSIONS])

GET GUILD APPLICATION COMMAND PERMISSIONS

This endpoint fetches a command's permissions in a guild by application_id, guild_id, and command_id, returning command permissions data and IDs, along with a permissions array. Errors return
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GET_GUILD_APPLICATION_COMMAND_PERMISSIONS])

SET GUILD APPLICATION COMMAND PERMISSIONS

Update guild application command permissions with a `PUT` request for up to 100 items, specifying `id`, `type`, and `permission`. Successful updates return command details and permissions; err
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_SET_GUILD_APPLICATION_COMMAND_PERMISSIONS])

ADD MY MESSAGE REACTION

This endpoint lets users add emoji reactions to messages in a channel. Success returns a 204 code; failures return an errors object with details specific to Discord API.
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_ADD_MY_MESSAGE_REACTION])

DELETE MY MESSAGE REACTION

This API endpoint lets users remove a specified reaction from a message in a channel. Successful deletions return a 204 code; client errors result in 4XX codes with a detailed error object.
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_DELETE_MY_MESSAGE_REACTION])

LIST PRIVATE ARCHIVED THREADS

This endpoint retrieves archived private threads in a channel, allowing filters by 'before' date and 'limit' (2-100). It returns details like thread ID, type, message count, and member info. E
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_LIST_PRIVATE_ARCHIVED_THREADS])

LIST PUBLIC ARCHIVED THREADS

This endpoint fetches archived public threads from a channel, allowing optional filters by 'before' timestamp and result limits. Successful responses include thread ID, type, and message count
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_LIST_PUBLIC_ARCHIVED_THREADS])

GET APPLICATION USER ROLE CONNECTION

The endpoint fetches user role connection details (platform, username, metadata) using a GET request and OAuth2 ('role_connections.write' scope). It covers successful and error responses relat
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GET_APPLICATION_USER_ROLE_CONNECTION])

UPDATE APPLICATION USER ROLE CONNECTION

Update a user's app role by specifying platform name (50 chars max) and username (100 chars max), with optional metadata. Includes success and error response handling.
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_UPDATE_APPLICATION_USER_ROLE_CONNECTION])

GET MY GUILD MEMBER

Fetches a user's guild membership details like avatar, status, join date, roles, and more, requiring `guilds.members.read` permission. Returns errors for client issues.
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GET_MY_GUILD_MEMBER])

GET APPLICATION ROLE CONNECTIONS METADATA

This endpoint fetches metadata for app role connections using application ID, supporting integer/datetime comparisons and security via BotToken. It returns metadata arrays or null, with error
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GET_APPLICATION_ROLE_CONNECTIONS_METADATA])

GET GUILD APPLICATION COMMAND

This endpoint fetches a guild's specific application command, needing application, guild, and command IDs. Returns command details if successful or a Discord error object otherwise. Access req
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_GET_GUILD_APPLICATION_COMMAND])

DELETE GUILD APPLICATION COMMAND

This endpoint deletes a specific command for a guild application by ID. On success, returns a 204 response. Client errors are detailed with Discord API error objects including codes and messag
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_DELETE_GUILD_APPLICATION_COMMAND])

UPDATE GUILD APPLICATION COMMAND

This API endpoint allows updating guild application commands using application, guild, and command IDs. It modifies details, options, permissions, and channels with authentication, returning s
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_UPDATE_GUILD_APPLICATION_COMMAND])

LIST GUILD APPLICATION COMMANDS

This endpoint fetches Discord guild-specific commands, detailing IDs, names, descriptions, and supports localization. It includes text/UI commands, permissions, input types, secures access via
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_LIST_GUILD_APPLICATION_COMMANDS])

CREATE GUILD APPLICATION COMMAND

This endpoint facilitates new guild application commands creation, allowing customization of options, permissions, and localization. It returns command details and specifies errors for client
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_CREATE_GUILD_APPLICATION_COMMAND])

JOIN THREAD

This endpoint lets users join a channel thread with PUT, returning a 204 on success and errors with codes and messages for client issues. Authentication requires a BotToken.
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_JOIN_THREAD])

LEAVE THREAD

This endpoint allows a user to leave a thread in a channel by their ID. Upon success, it returns a 204 code without content. For client errors, it provides a detailed error object including a
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_LEAVE_THREAD])

BULK DELETE MESSAGES

This endpoint enables bulk deletion of 2-100 messages in a Discord channel via message ID list. It returns a 204 on success and client error responses for failures. Bot token authentication is
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_BULK_DELETE_MESSAGES])

DELETE USER MESSAGE REACTION

Endpoint allows deleting a user's reaction (specified by emoji_name and user_id) to a message in a channel. It returns a 204 on success or a client error with a detailed message and error code
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_DELETE_USER_MESSAGE_REACTION])

LIST MESSAGE REACTIONS BY EMOJI

Get reactions by emoji on a specific message in a channel, providing pagination options `after` (snowflake) and `limit` (1-100). Responds with an array of user objects who reacted with the spe
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_LIST_MESSAGE_REACTIONS_BY_EMOJI])

DELETE ALL MESSAGE REACTIONS BY EMOJI

This endpoint allows the deletion of all reactions for a specific emoji on a message in a channel. Responses include a 204 on success or client errors with detailed messages.
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_DELETE_ALL_MESSAGE_REACTIONS_BY_EMOJI])

DELETE ALL MESSAGE REACTIONS

This endpoint deletes all reactions for a specified message, returning a 204 on success and providing error details in JSON format. Security is handled through BotToken.
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_DELETE_ALL_MESSAGE_REACTIONS])

CROSSPOST MESSAGE

The `/channels/{channel_id}/messages/{message_id}/crosspost` API endpoint enables message crossposting in channels, returning a 200 status and message details upon success or a 4XX error for c
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_CROSSPOST_MESSAGE])

CREATE THREAD FROM MESSAGE

Create threads from a message in a channel by specifying a name and optional parameters like auto-archive duration and rate limit per user. Returns details of the created thread, including its
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_CREATE_THREAD_FROM_MESSAGE])

Important

CREATE DM

Creates a direct message channel or group DM, requiring recipient ID(s) and optionally access tokens and nicknames for group DMs. Returns channel details including type and recipients on succe
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_CREATE_DM])

CREATE GUILD

Create a guild in Discord. Allows specifying guild details like name, icon, verification level, role permissions, and channels. Requires a guild name; other fields optional. Success response i
from composio_llamaindex import ComposioToolSet, Action tool_set = ComposioToolSet() tools = tool_set.get_tools(actions=[Action.DISCORD_CREATE_GUILD])

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 llamaindex_python?

When using discord and llamaindex_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 llamaindex_python?

Integrating discord with llamaindex_python is super easy with Composio.dev! You can use the Composio.dev API to call functions from both discord and llamaindex_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 llamaindex_python?

Both discord and llamaindex_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 llamaindex_python?

discord and llamaindex_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 llamaindex_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 llamaindex_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 llamaindex_python?

discord and llamaindex_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 llamaindex_python?

discord and llamaindex_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 llamaindex_python for my specific needs?

Absolutely! discord and llamaindex_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 llamaindex_python?

discord and llamaindex_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🧪