Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
reply to tiggering message instead of simply sending result message
Malik Talhabc0fc4e9c2b4
diff --git a/examples/discord_api.py b/examples/discord_api.pyindex c27aedd9c..350e1d547 100644--- a/examples/discord_api.py+++ b/examples/discord_api.py@@ -39,10 +39,21 @@ class DiscordBot(commands.Bot):if message.author == self.user: # Ignore the bot's messagesreturnif message.content.strip().startswith("$bu "):- await message.channel.send("Starting browser use task...")++ # await message.reply(+ # "Starting browser use task...",+ # mention_author=True # Don't ping the user+ # )+# run browser-useagent_message = await self.run_agent(message.content.replace("$bu ", "").strip())- await message.channel.send(f"{agent_message}")++ await message.channel.send(+ content=f"{agent_message}",+ reference=message,+ mention_author=True+ )+# await self.process_commands(message) # Needed to process bot commandsasync def run_agent(self, task: str) -> str: