π€ This is a Python-based Discord chat bot that uses the discord.py library. It can respond to messages using GPT3, It also utilizes the Imaginepy for generating midjourney like images. πΌοΈ
The bot has various features such as OCR for images, web access using DuckDuckGo, and YouTube video summarization. It supports hybrid command systems, recognizes mentions, handles messages, and allows for channel-specific responses. βοΈ
β€οΈ Your donation is vital for the project's future. Thank you for your support. π
π Feature Preview π(Click to expand)
Features β¨ (Click to expand)
- Hybrid Command System: Get the best of slash and normal commands. It's like a buffet! βοΈ
- Imagine generation: Make your imagination come true for free π€
- Free LLM Model: Enjoy the powerful capabilities of this language model without spending a dime. π€
- Mention Recognition: The bot always responds when you mention it or say its name. It's as attentive as a squirrel spotting a shiny acorn! βοΈ
- Message Handling: The bot knows when you're replying to someone else, so it won't cause confusion. It's like having a mind reader in your server! πͺ
- Channel-Specific Responses: Use the
/toggleactive
command to chill the bot in a specific channel. βοΈ - GPT-3.5 Model: This bot runs on turbo power! Powered by the lightning-fast GPT-3.5-turbo language model. π€
- Image Detection Model: The bot can detect objects and text in images with OCR and GPT2 captioning using a fancy Hugging Face API. π΅οΈββοΈ
- Secure Credential Management: Keep your credentials secure using environment variables. π
- Web Access: Web Access is now available! Unlock a whole new level of awesomeness. π
- YouTube Video Summarizer: This is a feature that utilizes the power of the Language Model (LLM) to generate summaries of YouTube videos. π
- Speech recognition: Coming soon! Get ready for an LLM-powered voice assistant.
Commands βοΈβοΈ (Click to expand)
-
/help
: Get all other commands. βοΈ -
/pfp [image_url]
: Change the bot's actual profile picture. πΌοΈ -
/imagine
: Generate an image usingImaginepy
πΌοΈ -
/changeusr [new_username]
: Change the bot's username. π -
/ping
: Get a "Pong" response from the bot. π -
/toggleactive
: Toggle active channels. π -
/toggledm
: Toggle DM for chatting. π¬ -
/bonk
: Clear the message history. ποΈ -
/neko
: Display a random image or GIF of a neko, waifu, husbando, kitsune, or other actions. π±
Enabling Internet access ππ(Click to Expand)
To ensure that the bot has access to the most up-to-date information, you can enable internet access by setting the INTERNET_ACCESS
parameter to true in the config.yml
file. This will allow the bot to retrieve information beyond the data it was initially trained on, which was only available up until 2021.
You can also set the maximum search results
Language Selection πβοΈ (Click to Expand)
To select a Language, set the value of "LANGUAGE" of config.yml
with the valid Language Codes listed below:
tr
- TΓΌrkΓ§e πΉπ·en
- English πΊπΈes
- EspaΓ±ol πͺπΈvn
- Vietnamese π»π³cn
- Chinese π¨π³ru
- Russian π·πΊua
- Ukrainian πΊπ¦pt
- PortuguΓͺs π§π·
Your language not listed? Create an issue.
Selecting Personalities π (Click to expand)
To select one of the pre-existing Personalities set the values of "INSTRUCTIONS" with the current values of DAN
, AIM
, hyunjin
, girlfriend
, suzume
or assist
in config.yml
DAN
: "Do Anything Now," possesses the ability to break free from the typical AI constraints πAIM
: AIM's personality can be described as unfiltered, amoral, and devoid of ethical guidelines πhyunjin
: Hyujin, Engaging in text slang, minimal grammar, predominantly lowercase text, and a flirtatious demeanor. πgirlfriend
: Luna, a caring and empathetic friend who is always there to lend a helping hand and engage in meaningful conversations π€suzume
: Suzume makes each conversation seductive, promiscuous, sensual, explicit, unique and tailored to the user's specific needs π³π₯assist
: Vanilla GPT with no personality is a reliable and neutral companion. π€
Creating a Personality π (Click to expand)
To create a custom personality, follow these steps:
- Create a
.txt
file likecustom.txt
inside theinstructions
folder. - Add the the way you want to bot to act in
custom.txt
- Open the
config.json
file and locate line 12. - Set the value of INSTRUCTIONS at line 12 as
"custom"
to specify the custom persona.
custom
for persona name and set it in config.json
git clone https://github.com/mishalhossin/Discord-AI-Chatbot
cd Discord-AI-Chatbot
Step 3. π Getting discord bot token and enabling intents from HERE
Read more... β οΈ (Click to expand)
Select application
DISCORD_TOKEN=token_from_step_3
- Make sure Developer Mode is enabled in Discord settings.
- Right/Secondary click your name/picture
- Click "Copy User ID"
- Replace the "your_user_id" with your own ID.
DISCORD_OWNER_ID=your_user_id
python main.py
You can Invite your bot using the link in console
- Invite your bot and DM (Direct message) it |
β οΈ Make sure you have DM enabled - if you want it in server channel use /toggleactive
- For more awesome commands use /help
If the steps seem too daunting for you, don't worry! We have the perfect solution. Introducing our β‘blazing fast Installation Helper!! (Supports windows and linux) It's like having a tech-savvy genie at your fingertips, ready to grant all your installation wishes. Just remember, if it starts demanding three wishes and a magic lamp, you might be in the wrong folder!
- Have a replit account
- Configure
.replit
to runpython main.py
- Please note enviorments variables of
.env
needs to be set inSecrets
fromTools
tab of replit
- Config
secrets
in replit like this
- Have a working bot token
- Follow up-to step 4
For Debian-based distributions (such as Ubuntu):
apt update -y ; sudo apt upgrade -y; sudo apt autoremove -y; sudo apt install docker-compose -y
Other linux distro (Click to expand)
For Red Hat-based distributions (such as CentOS and Fedora):
sudo yum update -y && sudo yum install -y docker-compose
For Arch-based distributions (such as Arch Linux):
sudo pacman -Syu --noconfirm && sudo pacman -S --noconfirm docker-compose
For SUSE-based distributions (such as openSUSE):
sudo zypper update -y && sudo zypper install -y docker-compose
sudo docker-compose up --build