{"id":27876892,"url":"https://github.com/codewithbalaji/discord-llm-bot","last_synced_at":"2025-05-05T02:53:33.913Z","repository":{"id":245297105,"uuid":"817826292","full_name":"codewithbalaji/discord-llm-bot","owner":"codewithbalaji","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-20T14:34:14.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-21T07:47:15.230Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codewithbalaji.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-06-20T14:16:01.000Z","updated_at":"2024-06-21T07:47:18.603Z","dependencies_parsed_at":"2024-06-21T07:47:18.336Z","dependency_job_id":"1aeda580-505f-4c32-8064-53e19dbc8ab5","html_url":"https://github.com/codewithbalaji/discord-llm-bot","commit_stats":null,"previous_names":["codewithbalaji/discord-llm-bot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithbalaji%2Fdiscord-llm-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithbalaji%2Fdiscord-llm-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithbalaji%2Fdiscord-llm-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithbalaji%2Fdiscord-llm-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codewithbalaji","download_url":"https://codeload.github.com/codewithbalaji/discord-llm-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252429952,"owners_count":21746571,"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":"2025-05-05T02:53:33.416Z","updated_at":"2025-05-05T02:53:33.904Z","avatar_url":"https://github.com/codewithbalaji.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Discord Bot with Local LLM\n\nThis is a simple Discord bot that uses the `discord.py` library to interact with Discord and the `ollama` library for chat functionality.\n\n## Features\n\n- Responds with a greeting when the `/hello` command is used.\n- Answers questions concisely using the `/ask` command.\n\n## Prerequisites\n\n- Python 3.7 or higher\n- A Discord account and a bot token\n- `pip` (Python package installer)\n\n## Setup\n\n### 1. Clone the Repository\n\nClone this repository to your local machine using:\n\n```bash\ngit clone https://github.com/codewithbalaji/discord-bot-local-llm.git\ncd discord-bot-local-llm\n```\n\n### 2. Create and Activate a Virtual Environment\n\nIt's a good practice to use a virtual environment to manage your dependencies. You can create and activate one using:\n\n```bash\n# On Windows\npython -m venv bot_env\nbot_env\\Scripts\\activate\n\n# On macOS/Linux\npython3 -m venv bot_env\nsource bot_env/bin/activate\n```\n\n### 3. Install Dependencies\n\nInstall the required packages using:\n\n```bash\npip install discord.py python-dotenv ollama\n```\n\n### 4. Set Up Environment Variables\n\nCreate a `.env` file in the root directory of your project and add your Discord bot token:\n\n```env\nDISCORD_BOT_TOKEN=your_discord_bot_token\n```\n\nReplace `your_discord_bot_token` with your actual Discord bot token.\n\n### 5. Run the Bot\n\nYou can start the bot by running the following command:\n\n```bash\npython app.py\n```\n\nYou should see a message in the console indicating that the bot has logged in successfully.\n\n## Usage\n\n### Commands\n\n- `/hello`: The bot will respond with a greeting.\n- `/ask \u003cquestion\u003e`: The bot will answer your question concisely.\n\n## Contributing\n\nIf you want to contribute to this project, please fork the repository and create a pull request with your changes.\n\n## License\n\nThis project is licensed under the MIT License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewithbalaji%2Fdiscord-llm-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodewithbalaji%2Fdiscord-llm-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewithbalaji%2Fdiscord-llm-bot/lists"}