A Discord bot written in Python3 and Discord.py meant to search the Web semantically. Full slash command support, as well as guild-wide use.
|
|
1 month ago | |
|---|---|---|
| Dockerfile | 1 month ago | |
| README.md | 1 month ago | |
| bot.py | 1 month ago | |
| docker-compose.yml | 1 month ago | |
| requirements.txt | 1 month ago |
This is a Python-based Discord bot that acts as a client for the Perplexica API. It allows users to perform searches and get answers directly in Discord.
Balanced and Fast search modes.Clone the repository (or download the files into a perplexica-discord-bot directory):
git clone https://github.com/your-username/perplexica-discord-bot.git
cd perplexica-discord-bot
Install the required Python libraries:
pip install -r requirements.txt
Configure the Bot:
.env.example file to .env (or create a new .env file).Open the .env file and replace "YOUR_DISCORD_BOT_TOKEN_HERE" with your actual Discord bot token.
DISCORD_BOT_TOKEN="YOUR_DISCORD_BOT_TOKEN_HERE"
Ensure your Perplexica instance is running.
http://localhost:3000/api/search. If your Perplexica instance is running on a different address, update the PERPLEXICA_API_URL variable in bot.py.Once the setup is complete, you can run the bot with the following command:
python bot.py
You should see a message in your console confirming that the bot has logged in and is ready.
Once the bot is running and has joined your Discord server, you can use the following slash commands:
/search <your query>: Get an answer to your question.
/search Who is the founder of Microsoft?/mode <mode>: Change your preferred search mode.
/mode FastEnjoy using Perplexica in Discord!