ephemeral messages :D

This commit is contained in:
Xory 2025-08-20 21:45:45 +03:00
parent b79d892d34
commit 1ce2218d6c
2 changed files with 7 additions and 4 deletions

View file

@ -7,7 +7,7 @@ A search engine in your discord client.
- [X] Command exec
- [X] Image & PDF recognitiion
- [X] System Prompt & Safety
- [ ] Ephermal
- [X] Ephemeral
- [ ] Research
- [ ] VC capabilities (difficult af to implement)
- [ ] ~~Image creation~~ (thrown out due to payment requirements)
- [ ] Image creation

View file

@ -66,8 +66,11 @@ async def generation(interaction: discord.Interaction) -> None:
@bot.tree.command(name="ask", description="ai thing yes 👍")
@app_commands.allowed_installs(guilds=False, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
async def ask(interaction: discord.Interaction, prompt: str, attachment: Optional[discord.Attachment]) -> None:
await interaction.response.defer()
async def ask(interaction: discord.Interaction, prompt: str, attachment: Optional[discord.Attachment], ephemeral: bool) -> None:
if not ephemeral:
await interaction.response.defer()
else:
await interaction.response.defer(ephemeral=True)
attachment_text: str | None = None
attachment_data: bytes | None = None