diff --git a/AGENTS.md b/AGENTS.md index 8e18594..4c4bb7f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -9,42 +9,42 @@ - All pip dependencies are installed in the environment. (Except packages related to locally running AI, due to their large size.) - You have the ability to directly push to the git repo over https (url already set). And you should when you finish your task and have tested it. - If you encounter any hard to fix errors when pushing just leave it to the user to fix them. Try fixing merge conflicts/not having work from the remote by yourself. -- You have a python script "tavily.py" in the project root, that you can use to search the web. +- You have a python script "tavilytool.py" in the project root, that you can use to search the web. # Tavily API Script Usage Instructions ## Basic Usage Search for information using simple queries: ```bash -python tavily.py "your search query" +python tavilytool.py "your search query" ``` ## Examples ```bash -python tavily.py "latest AI developments 2024" -python tavily.py "how to make chocolate chip cookies" -python tavily.py "current weather in New York" -python tavily.py "best programming practices Python" +python tavilytool.py "latest AI developments 2024" +python tavilytool.py "how to make chocolate chip cookies" +python tavilytool.py "current weather in New York" +python tavilytool.py "best programming practices Python" ``` ## Advanced Options ### Search Depth -- **Basic search**: `python tavily.py "query"` (default) -- **Advanced search**: `python tavily.py "query" --depth advanced` +- **Basic search**: `python tavilytool.py "query"` (default) +- **Advanced search**: `python tavilytool.py "query" --depth advanced` ### Control Results -- **Limit results**: `python tavily.py "query" --max-results 3` -- **Include images**: `python tavily.py "query" --include-images` -- **Skip AI answer**: `python tavily.py "query" --no-answer` +- **Limit results**: `python tavilytool.py "query" --max-results 3` +- **Include images**: `python tavilytool.py "query" --include-images` +- **Skip AI answer**: `python tavilytool.py "query" --no-answer` ### Domain Filtering -- **Include specific domains**: `python tavily.py "query" --include-domains reddit.com stackoverflow.com` -- **Exclude domains**: `python tavily.py "query" --exclude-domains wikipedia.org` +- **Include specific domains**: `python tavilytool.py "query" --include-domains reddit.com stackoverflow.com` +- **Exclude domains**: `python tavilytool.py "query" --exclude-domains wikipedia.org` ### Output Format -- **Formatted output**: `python tavily.py "query"` (default - human readable) -- **Raw JSON**: `python tavily.py "query" --raw` (for programmatic processing) +- **Formatted output**: `python tavilytool.py "query"` (default - human readable) +- **Raw JSON**: `python tavilytool.py "query" --raw` (for programmatic processing) ## Output Structure The default formatted output includes: @@ -55,13 +55,13 @@ The default formatted output includes: ## Command Combinations ```bash # Advanced search with images, limited results -python tavily.py "machine learning tutorials" --depth advanced --include-images --max-results 3 +python tavilytool.py "machine learning tutorials" --depth advanced --include-images --max-results 3 # Search specific sites only, raw output -python tavily.py "Python best practices" --include-domains github.com stackoverflow.com --raw +python tavilytool.py "Python best practices" --include-domains github.com stackoverflow.com --raw # Quick search without AI answer -python tavily.py "today's news" --no-answer --max-results 5 +python tavilytool.py "today's news" --no-answer --max-results 5 ``` ## Tips diff --git a/cogs/logging_cog.py b/cogs/logging_cog.py index 1c83276..91f2791 100644 --- a/cogs/logging_cog.py +++ b/cogs/logging_cog.py @@ -1,6 +1,5 @@ import discord from discord.ext import commands, tasks -from discord import ui import datetime import asyncio import aiohttp # Added for webhook sending @@ -126,7 +125,6 @@ class LoggingCog(commands.Cog): else: self.header.accessory = ui.Button(label="\u200b", disabled=True) self.header.add_item(ui.TextDisplay(name)) - def _user_display(self, user: Union[discord.Member, discord.User]) -> str: """Return display name, username and ID string for a user.""" display = user.display_name if isinstance(user, discord.Member) else user.name @@ -338,13 +336,13 @@ class LoggingCog(commands.Cog): await ctx.send(f"✅ Successfully configured logging to send messages to {channel.mention} via the new webhook `{new_webhook.name}`.") # Test send (optional) try: - test_view = self._create_log_embed( + test_embed = self._create_log_embed( "✅ Logging Setup Complete", f"Logs will now be sent to this channel via the webhook `{new_webhook.name}`.", color=discord.Color.green(), ) await new_webhook.send( - view=test_view, + embed=test_embed, username=webhook_name, avatar_url=self.bot.user.display_avatar.url, )