Skip to content

Instantly share code, notes, and snippets.

@idontcalculate
Created October 8, 2023 20:48
Show Gist options
  • Save idontcalculate/17010ccc6ce993135f1d1cc32b5774fa to your computer and use it in GitHub Desktop.
Save idontcalculate/17010ccc6ce993135f1d1cc32b5774fa to your computer and use it in GitHub Desktop.
@bot.command()
async def dogsplain(ctx, *, question: str):
print(f"User: {ctx.author.name}, Query: {question}")
try:
response = chat_bot.query(question)
await send_response(ctx, response)
except Exception as e:
await send_response(ctx, "An error occurred. Please try again!")
print("Error occurred during 'query' command:", e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment