{"id":26248293,"url":"https://github.com/sankeer28/discordbot-v2","last_synced_at":"2025-10-15T10:12:06.903Z","repository":{"id":241382753,"uuid":"806345885","full_name":"sankeer28/DiscordBot-v2","owner":"sankeer28","description":"Discord bot made using python with many features including AI chat, music playback, video downloader, OSINT tools, and more","archived":false,"fork":false,"pushed_at":"2024-06-14T03:36:59.000Z","size":306,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-14T23:37:42.714Z","etag":null,"topics":["bot","discord-bot","discord-osint","discord-py","ffmpeg-python","gemini-ai","gemini-api","giphy-api","nightcore","nightcore-music","nlp","nlp-library","osint-discord","spacy-nlp","voice-chat","voice-synthesis","yt-dlp","yt-downloader"],"latest_commit_sha":null,"homepage":"","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/sankeer28.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-05-27T02:40:52.000Z","updated_at":"2024-06-14T03:37:02.000Z","dependencies_parsed_at":"2024-06-01T16:47:27.887Z","dependency_job_id":"978282d1-e6f7-4a12-8868-83821950fe34","html_url":"https://github.com/sankeer28/DiscordBot-v2","commit_stats":null,"previous_names":["sankeer28/discordbot-v2"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sankeer28%2FDiscordBot-v2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sankeer28%2FDiscordBot-v2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sankeer28%2FDiscordBot-v2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sankeer28%2FDiscordBot-v2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sankeer28","download_url":"https://codeload.github.com/sankeer28/DiscordBot-v2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243419083,"owners_count":20287807,"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":["bot","discord-bot","discord-osint","discord-py","ffmpeg-python","gemini-ai","gemini-api","giphy-api","nightcore","nightcore-music","nlp","nlp-library","osint-discord","spacy-nlp","voice-chat","voice-synthesis","yt-dlp","yt-downloader"],"created_at":"2025-03-13T14:17:52.683Z","updated_at":"2025-10-15T10:12:01.856Z","avatar_url":"https://github.com/sankeer28.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/sankeer28/DiscordBot-v2/assets/112449287/131c6205-9301-4d15-b67a-96c3aa9e87dc\" width=\"300\" /\u003e\n\u003c/p\u003e\n\nDiscord bot made using Python with many features including AI chat, music playback, video downloader, OSINT tools, and more.\n\n## Getting Started\n\n### Prerequisites\n\n- Python 3.12+ 🐍** 3.10 if you want the OSINT tool [Maigret](https://github.com/sankeer28/DiscordBot-v2/tree/main?tab=readme-ov-file#to-use-the-command-maigret-)\n- [FFMPEG](https://ffmpeg.org/): installed onto system PATH\n  - Linux (apt): \n  ```sudo apt install ffmpeg```\n  - MacOS (via homebrew): \n      ```brew install ffmpeg```\n  - Windows: [guide](https://www.hostinger.com/tutorials/how-to-install-ffmpeg#:~:text=successfully%20installed%20FFmpeg.-,how%20to%20install%20ffmpeg%20on%20windows,-Before%20the%20installation): \n- pip\n\n## Features\n### Chat Interaction 💬:\n- Casual chat with the bot using its name. Not required to call its name if using the bot's DMs.\n- Immediate responses using Gemini AI 🤖.\n- Conversation is temporarily saved to memory for realism .\n- 50/50 chance to get a GIF from Giphy based on the context of what is being said in chat using Natural Language Processing (NLP) 🧠.\n  - [SpaCy](https://spacy.io/) NLP identifies the most relevant parts of a message by focusing on random nouns, proper nouns, adjectives, and verbs, excluding personal pronouns which might not contribute much to the context.\n\n### Media Retrieval 📺:\n- Returns images from [Google](https://www.google.com).\n- Searches [YouTube](https://www.youtube.com) for videos.\n- Returns images from [Pexels](https://www.pexels.com).\n- Downloads from various sources including [SoundCloud](https://soundcloud.com), [YouTube](https://www.youtube.com), [TikTok](https://www.tiktok.com), [Twitter](https://twitter.com), [Instagram](https://www.instagram.com), and [more](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md). **Video length must be under 30 mins, as Discord limits large file sizes.**\n\n### Image Related 🖼️:\n- Finds the source of images through reverse image search supporting various formats using [SauceNao](https://saucenao.com/).\n- Asks questions regarding uploaded images using [Gemini AI](https://gemini.google.com/).\n\n### OSINT Tools 🔓:\n- Integrates with [Sherlock](https://github.com/sherlock-project/sherlock) 🔍\n- Integrates with modified [WhatsMyName](https://github.com/C3n7ral051nt4g3ncy/WhatsMyName-Python). Returns either links to chat or creates html file with --html argument.\n- Integrates with [socialscan](https://github.com/iojw/socialscan).\n- Integrates with [Maigret](https://github.com/soxoj/maigret) - **Not compatible with modern Python versions, must enable** [manually](https://github.com/sankeer28/DiscordBot-v2/tree/main?tab=readme-ov-file#to-use-the-command-maigret-)\n- Logs info of members in servers, including the user's Discord IDs, server nickname, Discord username, and status/bio, into a folder called Servers as .json files.\n\n### Voice Chat 🎙️:\n- Automatically join the first voice chat that is filled in a server after anyone joins.\n- Automatically leaves voice chat after everyone leaves.\n\u003cdetails\u003e\n  \u003csummary\u003eUtilizes text-to-speech in voice chat, allowing the bot to vocalize text input\u003c/summary\u003e\n\nhttps://github.com/sankeer28/DiscordBot-v2/assets/112449287/32db7e02-0132-462f-9786-edba88e0509b\n\n\u003c/details\u003e\n\n- Plays audio from the various [sources](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md) in voice chat using the ```play``` command.\n    - Ability to infinitely loop any audio source played in voice channel 🔁.\n- For songs in a YouTube playlist, the URL of the specific song is automatically detected.\n  - **Example:**\n    - Original Playlist URL:\n    ```\n    https://www.youtube.com/watch?v=pDddlvCfTiw\u0026list=RDqRaqfpKPjIc\u0026index=5\n    ```\n    - Extracted Video URL: everything after '\u0026list' is removed\n    ```\n    https://www.youtube.com/watch?v=pDddlvCfTiw\n    ```\n\nThis process ensures that only the specific video is played, even if the provided URL is part of a playlist.\n\n\n### Leveling System 📈:\n- Users gain XP by sending messages.\n- Users receive a notification in the current chat when they level up.\n- Commands available:\n  - `level`: Check your current level and experience points.\n  - `leaderboard`: View the top 10 users by level.\n- All user levels and experience points are saved locally to a .json file to ensure persistence even after bot restarts.\n  \n### Video Manipulation 📹:\n- Generates [nightcore](https://en.wikipedia.org/wiki/Nightcore) videos or slowed-down videos using my project [Spedup-Slowed-MV](https://github.com/sankeer28/Spedup-Slowed-MV).\n  \n  \n## Running locally\n\n\n### Getting API Keys\n\n- **Google Custom Search Engine API Key**: Obtain from the Google Cloud Console. [Guide](https://developers.google.com/custom-search/v1/overview)\n- **Google API Keys**: Necessary for YouTube and Google Search. Obtain from the Google Cloud Console. [Guide](https://cloud.google.com/docs/authentication/api-keys)\n- **Saucenao API Key**: Get from the SauceNAO website. [Guide](https://saucenao.com/user.php?page=search-api)\n- **Pexels API Key**: Get from the Pexels website. [Guide](https://www.pexels.com/api/documentation/)\n- **Google Gemini AI API KEY:** Get from Google AI Studio. [Here](https://aistudio.google.com/app/apikey)\n- **Giphy API KEY:** Get from Giphy [website](https://developers.giphy.com/dashboard/)\n\n### Running the Bot\n\n1. Clone this repository:\n\n```bash\ngit clone https://github.com/sankeer28/DiscordBot-v2.git\n```\n\n2. Navigate to the bot directory:\n\n```bash\ncd DiscordBot-v2\n```\n\n### Installing Dependencies\n\n```bash\npip install -r requirements.txt\n```\nInstall NLP model\n```bash\npython -m spacy download en_core_web_sm\n```\n\n3. Fill in the API Keys on missing lines.\n     - Required APIs: Gemini API key, Google API keys, Google search engine ID, Saucenao API, Pexels API, Gify API\n     - Last Line: Discord bot token\n4. Rename the bot:\n   - change the bot's name from drake to your liking\n     \n5. Run the bot:\n\n```bash\npython bot.py\n```\n## Usage: type !help for all commands. There is **NO** prefix for all commands.\n| Command                               | Description                                                                                                    |\n|---------------------------------------|----------------------------------------------------------------------------------------------------------------|\n| `drake \u003cprompt\u003e`                      | Generate content using the Generative AI model. **Name of bot is customizable**.                                |\n| `image \u003cquery\u003e`                       | Search for images using Google Custom Search.                                                                  |\n| `google \u003cquery\u003e`                      | Perform a Google search.                                                                                       |\n| `youtube \u003cquery\u003e`                     | Search for videos on YouTube.                                                                                  |\n| `sauce \u003cimage_url\u003e`                   | Perform a reverse image search using SauceNAO.                                                                 |\n| `pexels \u003cquery\u003e`                      | Search for images on Pexels.                                                                                   |\n| `play \u003cURL or query\u003e`, `pause`, `resume`, `stop`, `leave` | Music commands. Supports URLs from these [websites](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md) |\n| `download \u003cURL\u003e`                      | Downloads and returns video to chat. Supports URLs from these [websites](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md) |\n| `cat`                                 | Random cat gif.                                                                                                |\n| `dog`                                 | Random dog gif.                                                                                                |\n| `sherlock \u003cusername\u003e`                 | Returns all sites where the user has created an account. Uses [Sherlock-project](https://github.com/sherlock-project/sherlock) |\n| `expose \u003cusername\u003e --html`            | Returns all sites where the user has created an account. Uses modified [WhatsMyName](https://github.com/C3n7ral051nt4g3ncy/WhatsMyName-Python) |\n| `socialscan \u003cusername or email\u003e`      | Accurately querying username and email usage on online platforms. Uses [socialscan](https://github.com/iojw/socialscan) |\n| `/join`                               | Joins any specified voice channel, even without joining it yourself                                             |\n| `/speak`                              | Says anything in voice channel you want using Microsoft's text to speech. Uses [edge-tts](https://pypi.org/project/edge-tts/) |\n| `/nightcore`                          | Creates nightcore video or slowed down video given URL. Uses my personal [project](https://github.com/sankeer28/Spedup-Slowed-MV) |\n\n\n## To use the command maigret \u003cusername\u003e\n- You are required to use Python 3.10 and must manually install maigret by ``` pip install maigret ```\n- Has not been added to !help as it is limited to a specific version of python\n- This feature uses [maigret](https://github.com/soxoj/maigret) takes in a username and returns a pdf report\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsankeer28%2Fdiscordbot-v2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsankeer28%2Fdiscordbot-v2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsankeer28%2Fdiscordbot-v2/lists"}