A runnable discord.py bot that adds a /ask_perplexity command to your server, using the Sonar API for web-connected answers.
discord.py
application that adds a /ask_perplexity
slash command to your Discord server, using Perplexity’s Sonar API for real-time, web-connected answers.
/ask_perplexity
command that’s easy to use..env
) for both Discord and Perplexity keys, keeping them safe.api-cookbook
repository to your local machine.
.env.example
file to .env
..env
file and add your secret keys:bot
and applications.commands
scopes.bot.py
script from your terminal: