A powerful Discord bot powered by Google's Gemini AI
Natural conversations โข Music playback โข Games & Entertainment โข Utility functions
Features โข Setup โข Commands โข Contributing
|
|
Requirement | Version | Purpose |
---|---|---|
๐ Python | 3.8+ | Core runtime |
๐ฎ Discord.py | 2.0+ | Discord integration |
๐ค Google Genai | Latest | AI processing |
๐ฆ Dependencies | See requirements.txt | Additional libraries |
# 1๏ธโฃ Clone the repository
git clone https://github.com/ifsvivek/LocalBot.git
cd LocalBot
# 2๏ธโฃ Create virtual environment
python -m venv .venv
# 3๏ธโฃ Activate virtual environment
# Windows:
.venv\Scripts\activate
# Linux/macOS:
source .venv/bin/activate
# 4๏ธโฃ Install dependencies
pip install -r requirements.txt
Create a .env
file in the root directory:
# ๐ค Discord Bot Token (Required)
TOKEN=your_discord_bot_token
# ๐ค Genius API for lyrics (Optional)
GENIUS_TOKEN=your_genius_api_token
# ๐งฎ Wolfram Alpha for calculations (Optional)
WOLF=your_wolframalpha_api_key
# ๐ง Google Gemini AI (Required)
GOOGLE_API_KEY=your_google_gemini_api_key
# ๐ค๏ธ Weather API (Optional)
WEATHER_API_KEY=your_openweathermap_api_key
# ๐ฐ News API (Optional)
NEWS_API_KEY=your_thenewsapi_key
# Default country for news is set to India (in). You can specify other countries when using news commands.
python LocalBot.py
๐ก Tip: The bot will show "localbot#1996 is ready and online!" when successfully started.
๐ฌ Chat & AI Commands
Command | Description | Example |
---|---|---|
@LocalBot [message] |
๐ฃ๏ธ Chat with Gemini AI | @LocalBot Hello there! |
/calculate [query] |
๐งฎ Solve mathematical queries | /calculate 2+2*3 |
/weather [city] |
๐ค๏ธ Get weather information | /weather New York |
/getnews [category] |
๐ฐ Get top news stories | /getnews tech |
/searchnews [query] |
๐ Search specific news | /searchnews Tesla |
๐ต Music Commands
Command | Description | Example |
---|---|---|
/play [query] |
๐ถ Play music from YouTube | /play Bohemian Rhapsody |
/stop |
โน๏ธ Stop current playback | /stop |
/lyrics [song] |
๐ค Get song lyrics | /lyrics Imagine Dragons |
/join |
โ Join voice channel | /join |
/leave |
โ Leave voice channel | /leave |
๐ฒ Games & Fun Commands
Command | Description | Example |
---|---|---|
/gtn |
๐ฏ Guess the number (1-10) | /gtn |
/dice [sides] |
๐ฒ Roll dice | /dice 20 |
/flip |
๐ช Flip a coin | /flip |
/ask [question] |
๐ฑ Ask yes/no questions | /ask Will it rain today? |
๐ท Image Commands
Command | Description | Example |
---|---|---|
/cat |
๐ฑ Random cat image | /cat |
/dog |
๐ Random dog image | /dog |
/gt |
๐ผ๏ธ GT meme image | /gt |
โก Utility Commands
Command | Description | Example |
---|---|---|
/purge [amount] |
๐๏ธ Delete messages | /purge 10 |
$clear [amount] |
๐งน Clear DM messages | $clear 5 |
$clear_history |
๐พ Reset chat memory | $clear_history |
$pin |
๐ Pin replied message | $pin |
Technology | Purpose | Version |
---|---|---|
๐ Python | Core Language | 3.8+ |
๐ฎ Discord.py | Discord Integration | 2.0+ |
๐ค Google Gemini | AI Processing | 2.5-Flash |
๐ต yt-dlp | YouTube Integration | Latest |
๐งฎ Wolfram Alpha | Mathematical Queries | API v2 |
๐ค Genius API | Lyrics Fetching | v1 |
- ๐พ Memory-persistent conversations
- ๐ Multiple API integrations
- โก Async/await architecture
- ๐ก๏ธ Error handling & logging
MIT License ยฉ 2025 LocalBot
This project is licensed under the MIT License - see the LICENSE
file for details.
Feel free to use, modify, and distribute this project as per the license terms.
We welcome contributions! Here's how you can help:
Type | Description |
---|---|
๐ Bug Reports | Found a bug? Open an issue! |
๐ก Feature Requests | Have an idea? We'd love to hear it! |
๐ง Code Contributions | Submit a Pull Request |
๐ Documentation | Help improve our docs |
- ๐ด Fork the repository
- ๐ฟ Create a feature branch
- ๐ป Make your changes
- โ Test thoroughly
- ๐ Submit a Pull Request