Prerequisites
The following example requires a Discord bot token which can be obtained from here.Example
cookbook/tools/discord.py
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
You are viewing v1 docs. For the latest documentation, visit docs.agno.com
export DISCORD_BOT_TOKEN=***
from agno.agent import Agent
from agno.tools.discord import DiscordTools
agent = Agent(
tools=[DiscordTools()],
show_tool_calls=True,
markdown=True,
)
agent.print_response("Send 'Hello World!' to channel 1234567890", markdown=True)
| Parameter | Type | Default | Description |
|---|---|---|---|
bot_token | str | - | Discord bot token for authentication. |
enable_messaging | bool | True | Whether to enable sending messages to channels. |
enable_history | bool | True | Whether to enable retrieving message history from channels. |
enable_channel_management | bool | True | Whether to enable fetching channel info and listing channels. |
enable_message_management | bool | True | Whether to enable deleting messages from channels. |
| Function | Description |
|---|---|
send_message | Send a message to a specified channel. Returns a success or error message. |
get_channel_info | Retrieve information about a specified channel. Returns the channel info as a JSON string. |
list_channels | List all channels in a specified server (guild). Returns the list of channels as JSON. |
get_channel_messages | Retrieve message history from a specified channel. Returns messages as a JSON string. |
delete_message | Delete a specific message by ID from a specified channel. Returns a success or error message. |
Was this page helpful?