> ## Documentation Index
> Fetch the complete documentation index at: https://langchain.idochub.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Discord

> [Discord](https://discord.com/) is an instant messaging, voice, and video communication platform widely used by communities of all types.

## Installation and Setup

Install the `langchain-discord-shikenso` package:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-discord-shikenso
  ```

  ```bash uv theme={null}
  uv add langchain-discord-shikenso
  ```
</CodeGroup>

You must provide a bot token via environment variable so the tools can authenticate with the Discord API:

```bash theme={null}
export DISCORD_BOT_TOKEN="your-discord-bot-token"
```

If `DISCORD_BOT_TOKEN` is not set, the tools will raise a `ValueError` when instantiated.

***

## Tools

Below is a snippet showing how you can read and send messages in Discord. For more details, see the [documentation for Discord tools](/oss/python/integrations/tools/discord).

```python theme={null}
from langchain_discord.tools.discord_read_messages import DiscordReadMessages
from langchain_discord.tools.discord_send_messages import DiscordSendMessage

# Create tool instances
read_tool = DiscordReadMessages()
send_tool = DiscordSendMessage()

# Example: Read the last 3 messages from channel 1234567890
read_result = read_tool({"channel_id": "1234567890", "limit": 3})
print(read_result)

# Example: Send a message to channel 1234567890
send_result = send_tool({"channel_id": "1234567890", "message": "Hello from Markdown example!"})
print(send_result)
```

***

## Toolkit

`DiscordToolkit` groups multiple Discord-related tools into a single interface. For a usage example, see [the Discord toolkit docs](/oss/python/integrations/tools/discord).

```python theme={null}
from langchain_discord.toolkits import DiscordToolkit

toolkit = DiscordToolkit()
tools = toolkit.get_tools()

read_tool = tools[0]  # DiscordReadMessages
send_tool = tools[1]  # DiscordSendMessage
```

***

## Future Integrations

Additional integrations (e.g., document loaders, chat loaders) could be added for Discord.
Check the [Discord Developer Docs](https://discord.com/developers/docs/intro) for more information, and watch for updates or advanced usage examples in the [langchain\_discord GitHub repo](https://github.com/Shikenso-Analytics/langchain-discord).
