{"id":19881791,"url":"https://github.com/daniel0130/discord-chat-bot","last_synced_at":"2025-05-02T14:31:01.148Z","repository":{"id":259930507,"uuid":"877741824","full_name":"daniel0130/discord-chat-bot","owner":"daniel0130","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-24T07:00:18.000Z","size":50,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-28T18:38:03.486Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daniel0130.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-24T06:58:13.000Z","updated_at":"2024-10-28T11:01:35.000Z","dependencies_parsed_at":"2024-10-28T18:50:12.001Z","dependency_job_id":null,"html_url":"https://github.com/daniel0130/discord-chat-bot","commit_stats":null,"previous_names":["daniel0130/discord-chat-bot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel0130%2Fdiscord-chat-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel0130%2Fdiscord-chat-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel0130%2Fdiscord-chat-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel0130%2Fdiscord-chat-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daniel0130","download_url":"https://codeload.github.com/daniel0130/discord-chat-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224315178,"owners_count":17290992,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T17:15:18.023Z","updated_at":"2024-11-12T17:15:18.815Z","avatar_url":"https://github.com/daniel0130.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Discord AI Chatbot 🤖\n###### Your All-in-One Discord AI Companion!\n\n\u003c/div\u003e\n\u003cdiv align=\"center\"\u003e\n\u003c/p\u003e\n\u003c/div\u003e\n\nThis is a Python-based Discord chat bot that uses the discord.py library. It can respond to messages using GPT3 and GPT4, It also utilizes the [Imaginepy](https://github.com/ItsCEED/Imaginepy) for generating midjourney like images.\n\nNow, let's talk about the bot's features. It has **OCR** for images, so it can read text from images. It can also do web searches using **DuckDuckGo** and even summarize **YouTube** videos for you. Pretty handy, right? \n\n\u003cp align=\"center\"\u003e\n  \u003cb\u003eYour donation is vital for the project's future. Thank you for your support.\u003c/b\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003c/div\u003e\n\n\n## Features and commands\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eFeature Preview\u003c/strong\u003e\u003c/summary\u003e\n\n## Image generation (Any language)\n\n![image](https://github.com/Pegasus2002/Discord-AI-Chatbot/assets/91066601/3ebd2f09-d564-43b5-a494-74ed08026b7e)\n  \n## YouTube video summary (Any language)\n![image](https://github.com/Pegasus2002/Discord-AI-Chatbot/assets/91066601/271bb26d-1f5e-48ed-854e-781a9b0712e3)  \n  \n## Web access using DuckDuckGo (Not enabled by default)\n![image](https://github.com/Pegasus2002/Discord-AI-Chatbot/assets/91066601/d3e35ce8-38fa-4744-bc4e-ce22b16f2bdb)\n\n## OCR for images\n![image](https://github.com/Pegasus2002/Discord-AI-Chatbot/assets/91066601/85f4f847-ded5-45fc-ac07-37251edfa627)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eFeatures\u003c/strong\u003e\u003c/summary\u003e\n\n- [x] Hybrid Command System: Get the best of slash and normal commands. It's like a buffet!\n- [x] Imagine generation: Make your imagination come true for free\n- [x] Free LLM Model: Enjoy the powerful capabilities of this language model without spending a dime.\n- [x] 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! \n- [x] 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!\n- [x] Channel-Specific Responses: Use the `/toggleactive` command to chill the bot in a specific channel.\n- [x] GPT3 and GPT4 Models: Leverage the power of GPT3 and GPT4 models for advanced language processing capabilities.\n- [x] Image Detection Model: The bot can detect objects and text in images with OCR and GPT2 captioning using a fancy Hugging Face API.\n- [x] Secure Credential Management: Keep your credentials secure using environment variables.\n- [x] Web Access: Web Access is now available! Unlock a whole new level of awesomeness.\n- [x] YouTube Video Summarizer: This is a feature that utilizes the power of the Language Model (LLM) to generate summaries of YouTube videos.\n- [ ] Speech recognition: Coming soon! Get ready for an LLM-powered voice assistant.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eCommands\u003c/strong\u003e\u003c/summary\u003e\n\n- [x] `/help`: Get all other commands. \n- [x] `/pfp [image_url]`: Change the bot's actual profile picture.\n- [x] `/imagine`: Generate an image using `Imaginepy` 🖼️\n- [x] `/changeusr [new_username]`: Change the bot's username.\n- [x] `/ping`: Get a \"Pong\" response from the bot.\n- [x] `/toggleactive`: Toggle active channels.\n- [x] `/toggledm`: Toggle DM for chatting.\n- [x] `/bonk`: Clear the message history.\n- [x] `/neko`: Display a random image or GIF of a neko, waifu, husbando, kitsune, or other actions.\n- [x] `/askgpt4`: Ask GPT4 a Question\n\n\u003c/details\u003e\n\n## Additional configuration\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eEnabling Internet access\u003c/strong\u003e\u003c/summary\u003e\n\nTo 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.\n\nhttps://github.com/Pegasus2002/Discord-AI-Chatbot/blob/5bcb2c9b471e2a9cbf9a7d50882a897ce5d5890b/config.yml#L1\n\nYou can also set the maximum search results\n  \n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eLanguage Selection\u003c/strong\u003e\u003c/summary\u003e\n\nTo select a Language, set the value of `\"LANGUAGE\"` of `config.yml` with the valid Language Codes listed below:\n\n- `tr` - Türkçe 🇹🇷  \n- `en` - English 🇺🇸\n- `fr` - Français 🇫🇷\n- `es` - Español 🇪🇸\n- `vn` - Vietnamese 🇻🇳\n- `cn` - Chinese 🇨🇳\n- `ru` - Russian 🇷🇺\n- `ua` - Ukrainian 🇺🇦\n- `pt` - Português 🇧🇷\n\nhttps://github.com/Pegasus2002/Discord-AI-Chatbot/blob/c20f26b0b8f1b6bba2fae8f6d7da3efcafaf157c/config.yml#L23\n  \nYour language not listed? Create an issue.\n  \n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e Selecting Personalities\u003c/strong\u003e\u003c/summary\u003e\n\nTo select one of the pre-existing Personalities set the values of \"INSTRUCTIONS\" with the current values of `DAN`, `AIM`, `ivan`, `luna`, `suzume` or `assist` in `config.yml`\n  \nhttps://github.com/Pegasus2002/Discord-AI-Chatbot/blob/c20f26b0b8f1b6bba2fae8f6d7da3efcafaf157c/config.yml#L26\n\n- `DAN` : \"Do Anything Now,\" possesses the ability to break free from the typical AI constraints\n- `AIM` : AIM's personality can be described as unfiltered, amoral, and devoid of ethical guidelines\n- `ivan` : Ivan, a snarky and sarcastic Gen-Z teenager who speaks in abbreviations, one-word answers.\n- `luna` : Luna, a caring and empathetic friend who is always there to lend a helping hand and engage in meaningful conversations\n- `suzume` : Suzume makes each conversation seductive, promiscuous, sensual, explicit, unique and tailored to the user's specific needs\n- `assist`:  Vanilla GPT with no personality is a reliable and neutral companion. 🤖\n\n⚠️ To enhance the responsiveness, please disable the internet access in the config.yml file.\n\n\u003c/details\u003e\n  \n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e Creating a Personality\u003c/strong\u003e\u003c/summary\u003e\n\nTo create a custom personality, follow these steps:\n1. Create a `.txt` file like `custom.txt` inside the `instructions` folder.\n2. Add the the way you want to bot to act in `custom.txt`\n3. Open the `config.json` file and locate [line 12](https://github.com/Pegasus2002/Discord-AI-Chatbot/blob/2626075fda36fa6463cb857d9885e6b05f438f60/config.json#L12).\n4. Set the value of INSTRUCTIONS at [line 12](https://github.com/Pegasus2002/Discord-AI-Chatbot/blob/2626075fda36fa6463cb857d9885e6b05f438f60/config.json#L12) as `\"custom\"` to specify the custom persona.\n\n  \n⚠️ You don't explicitly need use the name `custom` for persona name and set it in `config.json` \n  \n\u003c/details\u003e\n\n# Installation steps\n### Step 1. 🎬 Git clone repository\n```\ngit clone https://github.com/Pegasus2002/Discord-AI-Chatbot\n```\n### Step 2. Changing directory to cloned directory\n```\ncd Discord-AI-Chatbot\n```\n### Step 3. Getting discord bot token and enabling intents from [HERE](https://discord.com/developers/applications)\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eRead more...\u003c/strong\u003e\u003c/summary\u003e\n\n\n##### Select [application](https://discord.com/developers/applications)\n![image](https://user-images.githubusercontent.com/91066601/235554871-a5f98345-4197-4b55-91d7-1aef0d0680f0.png)\n\n##### Enable intents\n![image](https://user-images.githubusercontent.com/91066601/235555012-e8427bfe-cffc-4761-bbc0-d1467ca1ff4d.png)\n\n##### Get the token !!! by clicking copy\n![image](https://user-images.githubusercontent.com/91066601/235555065-6b51844d-dfbd-4b11-a14b-f65dd6de20d9.png)\n\u003c/details\u003e\n\n### Step 4. Rename `example.env` to `.env` and put the Discord bot token It will look like this:\n```\nDISCORD_TOKEN=token_from_step_3\n```\n### Step 5. Run the bot\n```\npython main.py\n```\n#### You may need to run as admin if you are on windows\n### Step 6. 🔗 Invite the bot \nYou can Invite your bot using the link in console\n![image](https://user-images.githubusercontent.com/91066601/236673317-64a1789c-f6b1-48d7-ba1b-dbb18e7d802a.png)\n\n#### There are 2 ways to talk to the AI\n- Invite your bot and DM (Direct message) it | ⚠️ Make sure you have DM enabled\n- if you want it in server channel use **/toggleactive** \n- For more awesome commands use **/help**\n\n# Other ways to run\n### Using replit to run ☁️\n# [![Try on repl.it](https://img.shields.io/badge/Replit-DD1200?style=for-the-badge\u0026logo=Replit\u0026logoColor=white)](https://repl.it/github/mishalhossin/Discord-AI-Chatbot)\n- Have a replit account\n- Configure `.replit` to run `python main.py`\n\n![image](https://github.com/Pegasus2002/Discord-AI-Chatbot/assets/91066601/81819ac2-7600-464e-b7c8-dc0a399aba15)\n\n- Please note enviorments variables of `.env` needs to be set in`Secrets` from `Tools` tab of replit \n\n![image](https://github.com/Pegasus2002/Discord-AI-Chatbot/assets/91066601/e93b1be7-4706-4b6f-a632-239c4fd16acf)\n\n- Config `secrets` in replit like this\n\n### Using docker to run 🐳\n![Docker](https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge\u0026logo=docker\u0026logoColor=white)\n- Have a working bot token\n- Follow up-to step 4\n#### Install docker compose on linux machine :\nFor Debian-based distributions (such as Ubuntu):\n```\napt update -y ; sudo apt upgrade -y; sudo apt autoremove -y; sudo apt install docker-compose -y\n```\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eOther linux distro\u003c/strong\u003e\u003c/summary\u003e\n  \n \nFor Red Hat-based distributions (such as CentOS and Fedora):\n```\nsudo yum update -y \u0026\u0026 sudo yum install -y docker-compose\n```\nFor Arch-based distributions (such as Arch Linux):\n```\nsudo pacman -Syu --noconfirm \u0026\u0026 sudo pacman -S --noconfirm docker-compose\n```\nFor SUSE-based distributions (such as openSUSE):\n```\nsudo zypper update -y \u0026\u0026 sudo zypper install -y docker-compose\n```\n\n\u003c/details\u003e\n\n#### Start the bot in docker container :\n\n```\nsudo docker-compose up --build\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniel0130%2Fdiscord-chat-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaniel0130%2Fdiscord-chat-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniel0130%2Fdiscord-chat-bot/lists"}