A comprehensive multifunctional Rubika bot built with Python, featuring advanced group management, moderation, automation, AI integration, learning systems, entertainment, user progression, custom commands, and database-backed group configuration.
- 📖 About
- 🚀 Why Rubika Smart Bot?
- ✨ Key Features
- 👑 Group Management
- 🛡️ Security & Moderation
- 🤖 AI System
- 🧠 Learning System
- 👤 User System
- 🏆 Levels, XP & Badges
- ⚙️ Automation
- 🎮 Games & Entertainment
- 📊 Reports & Statistics
- 💾 Database
- 🌐 External Services
- 🛠️ Technologies
- 🚀 Installation
- ⚙️ Configuration
▶️ Usage- 📚 Command Examples
- 🎯 Target Audience
- 🌟 Project Highlights
- 🗺️ Roadmap
- ❓ FAQ
- 🤝 Contributing
- 📬 Contact
- 📄 License
Rubika Smart Bot is a multifunctional Persian Rubika group bot developed with Python.
The project combines group administration, moderation, automation, AI interaction, learning, entertainment, user progression, custom commands, information services, and persistent database storage into a single platform.
The bot is designed primarily for Persian-speaking Rubika communities and provides administrators with a broad set of configurable tools for managing group activity.
The current implementation is centered around a large asynchronous Python application with SQLite-based persistence and multiple external HTTP/API integrations.
Managing a large group often requires multiple systems for moderation, permissions, automation, interaction, and entertainment.
Rubika Smart Bot brings these capabilities together into one configurable platform.
The project focuses on:
- 🛡️ Group security and moderation
- ⚙️ Administrative automation
- 🤖 AI-powered interaction
- 🧠 Learning and custom responses
- 👤 User management and permissions
- 🏆 XP, levels, badges, and leaderboards
- 🎮 Interactive games
- 📊 Group reports and statistics
- 💾 Persistent SQLite storage
- 🔧 Customizable group behavior
- 🇮🇷 Persian-language interaction
- AI-powered question answering
- Advanced learning system
- Custom commands
- Automatic responses
- Speaker system
- Personal speaker
- Polite speaker mode
- Default speaker mode
- Text-to-speech related functionality
- Group owner management
- Assistant administrators
- Special users
- Exempt users
- Group rules
- Group status
- Group lock system
- Ban locks
- Warning locks
- User warnings
- Mute management
- Customizable permissions
- Anti-Link
- Anti-Advertisement
- Anti-Curse
- Anti-Hang
- Anti-Emoji
- Anti-Edit
- Anti-Mention
- GIF control
- Content-type locks
- Bot protection
- CAPTCHA configuration
- Blacklist words
- Whitelist links
- Warning system
- Automatic message deletion
- XP system
- User levels
- Level-based badges
- Group leaderboard
- User profiles
- User notes
- Achievements
- Daily rewards
- Favorites
- Birthdays
- Mathematical game
- Word game
- Number guessing game
- Dice game
- Hafez fortune
- Riddles
- Jokes
- Interesting facts
- Movie suggestions
- English tips
- Motivational content
- Hadith
- Reports
- Group statistics
- Polls
- Events
- Petitions
- Giveaways
- Timers
- Reminders
- Topics
- Tags
- Invite links
- Log channels
- Custom reactions
- Auto responders
Rubika Smart Bot provides a multi-level administration system designed for group owners and administrators.
Administrators can control the bot's operating status:
ربات روشن
ربات خاموش
Group rules can be viewed and configured:
قوانین
تنظیم قوانین
The bot supports configurable locks for different types of content.
Supported lock categories include:
- ID
- Links
- Text
- Stickers
- Voice
- Video
- Music
- Images
- GIFs
- Files
- English words
- Replies
- Forwards
- Edits
- Emojis
- Code
- Curse words
- Polls
- Numbers
- Phone numbers
- Hashtags
- Groups
Example:
لینک قفل
لینک باز
Administrators can manage user warnings and muted users.
The system supports:
- Adding warnings
- Removing warnings
- Warning limits
- Configurable warning actions
- Temporary mute
- Permanent mute
- Mute lists
- Clearing mute data
Security and moderation are core components of the project.
The bot provides configurable moderation systems such as:
| System | Function |
|---|---|
| 🔗 Anti-Link | Controls unwanted links |
| 📢 Anti-Advertisement | Controls advertisements |
| 🤬 Anti-Curse | Filters inappropriate language |
| 🌀 Anti-Hang | Controls problematic message patterns |
| 😀 Anti-Emoji | Controls emoji-based content |
| ✏️ Anti-Edit | Controls edited messages |
| 🚫 Anti-Mention | Controls unwanted mentions |
| 🎞️ GIF Control | Controls GIF messages |
| 🤖 Bot Protection | Helps manage bot accounts |
| 🧩 CAPTCHA | Supports group verification settings |
| 📝 Blacklist | Blocks configured words |
| 🔗 Whitelist | Allows configured links |
Each group can maintain its own configuration.
The bot includes an AI interaction system connected through an external API.
Users can send a question using the + prefix.
Example:
+پایتون چیست؟
The bot sends the request to the configured AI service and returns the response to the group.
The AI endpoint is configurable through the bot's configuration variables.
⚠️ API credentials and private tokens should never be committed to the public repository.
The project contains both custom-command functionality and an advanced learning system.
Groups can define custom commands and responses.
Example:
!سلام!سلام صدرا!
The bot stores the custom response for future use.
The advanced learning system supports storing multiple responses for keywords.
It also supports removing:
- All responses for a keyword
- A specific response for a keyword
Example formats include:
!keyword!response
and:
!!keyword
The stored learning data is persisted in SQLite.
Rubika Smart Bot maintains user-related data for each group.
The system supports:
- User profiles
- User notes
- User warnings
- User badges
- User achievements
- User levels
- XP
- Favorites
- Birthdays
- Daily rewards
- Cooldowns
- Reports
This allows the bot to provide personalized and persistent functionality for group members.
The project includes a gamified user progression system.
Users can earn XP through supported interactions and games.
The system maintains:
- Current XP
- Current level
- XP required for the next level
- XP progress
- Group leaderboard
- User badges
- Level-based achievements
Special badges are awarded at specific levels.
The current implementation includes badge milestones such as:
Level 10 → Silver
Level 20 → Gold
Level 50 → Diamond
Users can also view the leaderboard:
لیست برترینها
and their earned badges.
The bot contains several automation systems for reducing repetitive administrative tasks.
Administrators can enable automatic deletion and configure its timing.
حذف خودکار روشن
حذف خودکار خاموش
Command timers and group timers can be stored and managed.
Groups can maintain reminders for users and scheduled events.
The database architecture includes configurable welcome and goodbye messages.
Groups can define automated responses for specific triggers.
The project includes database support for automatic group roles based on user levels.
The bot provides several interactive games.
بازی ریاضی
بازی کلمات
بازی حدس عدد
Users can make an even/odd prediction:
تاس زوج
or:
تاس فرد
فال حافظ
معما
جواب معما
لطیفه
The project also includes additional interactive content such as interesting facts, movie suggestions, English tips, and other informational responses.
The bot maintains message and activity statistics.
Supported report categories include:
- Text messages
- Photos
- Videos
- Stickers
- Files
- Links
- Forwarded messages
Administrators can request group reports using:
گزارشات
The bot also provides configuration status information for various group systems.
The database architecture includes support for several community-oriented features.
Polls can include:
- Questions
- Multiple options
- Anonymous voting
- Multiple-choice configuration
- End times
- Vote tracking
Groups can create and manage events with:
- Event name
- Event description
- Event time
- Participants
- Creator
The bot supports petition-related data including:
- Title
- Description
- Target votes
- Current votes
- Signatures
- End time
Giveaways can store:
- Prize
- Winner count
- Participants
- End time
- Creator
The project uses SQLite as its persistent database.
The database is automatically initialized by the application and contains multiple tables for storing group and user information.
Major database areas include:
- User levels
- User badges
- Custom commands
- Warnings
- Invites
- Topics
- Birthdays
- Reminders
- Blacklists
- Whitelists
- Logs
- Auto roles
- User notes
- Giveaways
- Quizzes
- Events
- Achievements
- Filters
- Auto responders
- Cooldowns
- Welcome messages
- Goodbye messages
- CAPTCHA settings
- Timers
- Music queues
- Favorites
- Custom reactions
- Petitions
- Daily rewards
- Voice chat settings
- Bot protection
- Tags
- Polls
- Group links
- Group settings
- Locks
The database file is:
chats.db
The project communicates with several external HTTP services for different features.
These integrations are used for capabilities such as:
- 🤖 AI responses
- 📰 News
- 💰 Cryptocurrency information
- 💱 Currency information
- 📅 Date and time information
- 🌤️ Weather
- 🖼️ Image retrieval
- 📱 Application search
- 🎂 Birthday information
- 🔊 Speaker/TTS functionality
- 📚 Other information services
External endpoints can change independently of the project.
| Technology | Purpose |
|---|---|
| 🐍 Python | Main programming language |
| ⚡ asyncio | Asynchronous programming |
| 🤖 Rubka | Rubika bot framework |
| 💾 SQLite | Persistent data storage |
| 🌐 aiohttp | Asynchronous HTTP requests |
| 🌐 Requests | HTTP requests |
| 🌐 HTTPX | HTTP client |
| 🍲 BeautifulSoup | Web scraping and HTML parsing |
| 📅 jdatetime | Persian date and time |
| 🔐 hashlib | Hashing functionality |
| 🧩 Regular Expressions | Text processing and command parsing |
| 🔌 External APIs | AI and information services |
git clone https://github.com/sadra-hatami/Rubika-Smart-Bot.git
cd Rubika-Smart-BotInstall the required Python packages used by the project.
pip install rubka aiohttp requests httpx beautifulsoup4 jdatetimeConfigure your private credentials and API settings before running the application.
python index.pyThe bot uses configuration variables for its database, administrator information, channel information, and external API settings.
Example:
DB_PATH = "chats.db"
ADMIN_CHAT_ID = "your_admin_chat_id"
ADMIN_ID = [ADMIN_CHAT_ID]
CHANNEL_LINK = "@your_channel"
CHANNEL_CREATOR = "@your_creator"
AI_API_URL = "your_ai_api_url"The bot token should be configured separately and must not be committed to GitHub.
For production use, sensitive values should be stored in environment variables or a .env file.
Example:
BOT_TOKEN=your_bot_token
ADMIN_CHAT_ID=your_admin_chat_id
CHANNEL_LINK=@your_channel
CHANNEL_CREATOR=@your_creator
AI_API_URL=your_ai_api_urlAdd the following to .gitignore:
.env
chats.db
__pycache__/
*.pyc- Add the bot to your Rubika group.
- Give it the required administrator permissions.
- Register the group using the activation command.
فعال
راهنما
or:
دستورات
وضعیت
ربات روشن
ربات خاموش
قوانین
تنظیم قوانین
ضد لینک روشن
ضد لینک خاموش
ضد تبلیغ روشن
ضد تبلیغ خاموش
ضد فحش روشن
ضد فحش خاموش
ضد ایموجی روشن
ضد ایموجی خاموش
ضد ویرایش روشن
ضد ویرایش خاموش
ضد منشن روشن
ضد منشن خاموش
حذف خودکار روشن
حذف خودکار خاموش
حذف خودکار زمان 30
سخنگو روشن
سخنگو خاموش
سخنگو شخصی روشن
سخنگو شخصی خاموش
سخنگو باادب روشن
سخنگو بی ادب روشن
+پایتون چیست؟
!سلام!سلام!
لیست برترینها
بازی ریاضی
بازی کلمات
بازی حدس عدد
فال حافظ
معما
جواب معما
لطیفه
حقیقت جالب
پیشنهاد فیلم
نکته انگلیسی
گزارشات
For administrators who need a centralized group management and moderation system.
For managing rules, permissions, warnings, locks, users, and automated systems.
For developers interested in Python-based Rubika bot development.
For developers interested in asynchronous applications, APIs, databases, automation, and message-driven systems.
For Rubika groups looking for management, interaction, entertainment, and automation features in Persian.
✅ Multifunctional Persian Rubika bot
✅ Large-scale Python implementation
✅ Asynchronous architecture using asyncio
✅ SQLite-based persistent storage
✅ Advanced group moderation
✅ Multi-level permission system
✅ AI API integration
✅ Advanced learning system
✅ Custom command engine
✅ XP, levels, badges, and leaderboard
✅ Multiple interactive games
✅ Automated group controls
✅ Warnings and mute management
✅ CAPTCHA and bot protection support
✅ Polls, events, petitions, and giveaways
✅ Timers and reminders
✅ User profiles and achievements
✅ Extensive external API integrations
Future development may include:
- 🤖 More advanced AI capabilities
- 🧠 Improved learning architecture
- 🛡️ More advanced moderation systems
- 📊 Advanced analytics dashboard
- 🌐 Web-based administration panel
- 📱 Dedicated management interface
- ⚡ Performance optimization
- 🧩 Modular command architecture
- 🔐 Improved secrets management
- 🧪 Automated testing
- 📝 Expanded documentation
- 🐳 Docker deployment
- 🔄 Improved database architecture
The project is primarily written in Python.
Yes. The bot uses Python's asyncio architecture together with asynchronous Rubka functionality and HTTP clients.
Yes. The project uses SQLite for persistent storage.
Yes. An external AI API is integrated into the bot.
Yes. Groups can create and manage custom commands and responses.
Yes. The project contains both custom command functionality and an advanced learning system.
Yes. Users can earn XP, progress through levels, receive badges, and appear on the group leaderboard.
Yes. The command system and primary interaction language are Persian.
Contributions and suggestions are welcome.
You can contribute by:
- 🐛 Reporting bugs
- 💡 Suggesting new features
- 🔧 Improving the source code
- ⚡ Optimizing performance
- 🔐 Improving security
- 📝 Improving documentation
- 🧪 Adding tests
- 🔀 Submitting Pull Requests
Please keep contributions focused, readable, and consistent with the project's architecture.
📧 Email: sadra.hatami.1732@gmail.com
🌐 GitHub: sadra-hatami
For questions, suggestions, bug reports, or collaboration, feel free to get in touch.
This project is licensed under the MIT License.
See the LICENSE file for more information.
© 2026 Sadra Hatami
All rights reserved.
This project is developed and maintained by Sadra Hatami.
If you find Rubika Smart Bot useful, consider giving the repository a ⭐ on GitHub.
Your support helps the project grow and encourages future development.