Tools
Discord Tools
Examples
- Introduction
- Getting Started
- Agents
- Workflows
- Applications
Agent Concepts
- Multimodal
- RAG
- Knowledge
- Memory
- Teams
- Async
- Hybrid Search
- Storage
- Tools
- DuckDuckGo Search
- Calculator
- Airflow Tools
- Apify Tools
- ArXiv Tools
- AWS Lambda Tools
- Baidu Search Tools
- Cal.com Tools
- Composio Tools
- Confluence Tools
- Crawl4ai Tools
- CSV Tools
- DALL-E Tools
- Desi Vocal Tools
- Discord Tools
- DuckDB Tools
- Email Tools
- Exa Tools
- Fal Tools
- File Tools
- Firecrawl Tools
- Giphy Tools
- GitHub Tools
- Google Calendar Tools
- Google Search Tools
- Hacker News Tools
- Jina Reader Tools
- Jira Tools
- Linear Tools
- Luma Labs Tools
- MLX Transcribe Tools
- Models Labs Tools
- Newspaper Tools
- Newspaper4k Tools
- OpenBB Tools
- Pandas Tools
- Postgres Tools
- PubMed Tools
- Python Tools
- Replicate Tools
- Resend Tools
- SearxNG Tools
- SerpAPI Tools
- Shell Tools
- Slack Tools
- Sleep Tools
- Spider Tools
- SQL Tools
- Tavily Tools
- Twilio Tools
- Twitter Tools
- Website Tools
- Wikipedia Tools
- YFinance Tools
- YouTube Tools
- Zendesk Tools
- Vector Databases
- Embedders
Models
- Anthropic
- AWS Bedrock Claude
- Azure OpenAI
- Cohere
- DeepSeek
- Fireworks
- Gemini
- Groq
- Hugging Face
- Mistral
- NVIDIA
- Ollama
- OpenAI
- Together
- Vertex AI
- xAI
Tools
Discord Tools
Code
cookbook/agent_concepts/tools/discord_tools.py
from agno.agent import Agent
from agno.tools.discord import DiscordTools
discord_tools = DiscordTools(
bot_token=discord_token,
enable_messaging=True,
enable_history=True,
enable_channel_management=True,
enable_message_management=True,
)
discord_agent = Agent(
name="Discord Agent",
instructions=[
"You are a Discord bot that can perform various operations.",
"You can send messages, read message history, manage channels, and delete messages.",
],
tools=[discord_tools],
show_tool_calls=True,
markdown=True,
)
channel_id = "YOUR_CHANNEL_ID"
server_id = "YOUR_SERVER_ID"
discord_agent.print_response(
f"Send a message 'Hello from Agno!' to channel {channel_id}", stream=True
)
discord_agent.print_response(f"Get information about channel {channel_id}", stream=True)
discord_agent.print_response(f"List all channels in server {server_id}", stream=True)
discord_agent.print_response(
f"Get the last 5 messages from channel {channel_id}", stream=True
)
Usage
1
Create a virtual environment
Open the Terminal
and create a python virtual environment.
2
Set your Discord token
export DISCORD_BOT_TOKEN=xxx
3
Install libraries
pip install -U discord.py agno
4
Run Agent