Discord
This notebook provides a quick overview for getting started with Discord tooling in langchain_discord. For more details on each tool and configuration, see the docstrings in your repository or relevant doc pages.
Overviewโ
Integration detailsโ
Class | Package | Serializable | JS support | Package latest |
---|---|---|---|---|
DiscordReadMessages , DiscordSendMessage | langchain-discord-shikenso | N/A | TBD |
Tool featuresโ
DiscordReadMessages
: Reads messages from a specified channel.DiscordSendMessage
: Sends messages to a specified channel.
Setupโ
The integration is provided by the langchain-discord-shikenso
package. Install it as follows:
%pip install --quiet -U langchain-discord-shikenso
Credentialsโ
This integration requires you to set DISCORD_BOT_TOKEN
as an environment variable to authenticate with the Discord API.
export DISCORD_BOT_TOKEN="your-bot-token"
import getpass
import os
# Example prompt to set your token if not already set:
# if not os.environ.get("DISCORD_BOT_TOKEN"):
# os.environ["DISCORD_BOT_TOKEN"] = getpass.getpass("DISCORD Bot Token:\n")
You can optionally set up LangSmith for tracing or observability:
# os.environ["LANGCHAIN_TRACING_V2"] = "true"
# os.environ["LANGCHAIN_API_KEY"] = getpass.getpass()