An asynchronous world-strategy bot for Rubika: players choose a country, build an economy, raise an army, trade, form alliances, and compete on a shared board — with saved JSON state and a keypad interface.
- About
- Related Repositories
- Why This Project?
- Key Features
- Architecture
- Project Structure
- Technologies
- Installation
- Configuration
- Usage
- Target Audience
- Roadmap
- FAQ
- Contributing
- Contact
- License
- Copyright
- Support
World War Bot is a Persian strategy game for Rubika.
A player picks a server, a continent, and a country. From the keypad they manage resources, buildings, research, and an army, then meet other players through diplomacy, trade, alliances, and rankings. Daily rewards, invites, statements, and a chance wheel keep the session alive between visits.
The application is one asynchronous file, bot.py, built with rubka. Game state is a GameDB layer that loads and writes JSON files under war_game_v3/.
Tagline: A Persian Rubika strategy bot where players lead a nation, grow an economy, and compete in a shared world.
| Repository | Role |
|---|---|
| World War Bot | World strategy game (this repo) |
| Countries War Bot | Earlier nation strategy game |
| Rubika Group Bot | Complete group platform |
| Rubika Advanced Group Bot | Newest, larger group platform |
| Telegram Rubika Account Panel | Telegram panel for a Rubika user account |
Use this repository for the world strategy game.
Use Countries War Bot for the earlier country game.
Use the group bots for moderation and automation.
Use the Account Panel only to control a user account from Telegram.
A chat bot can answer one command. A strategy bot has to remember a country.
This project keeps a shared world:
- Every player owns a named nation
- Economy, buildings, and research change over time
- Diplomacy, trade, and alliances connect players
- Rankings and daily rewards pull people back
- JSON saves survive a restart
It shows how a Rubika bot can carry a full game loop, not only a help menu.
- 🌍 Server, continent, and country selection
- 🏛️ Country profile and resources
- ⚔️ Army menu and military actions
- 🏗️ Buildings and upgrades
- 🛒 Market, exchange, and trade offers
- 🤝 Diplomacy, alliances, and ally chat
- 🔬 Research
- 🕵️ Intelligence actions
- 🏆 World ranking
- 🎖️ Achievements
- 🎁 Daily bonus and invite codes
- 🎲 Lucky wheel
- 🌐 Shared institutions and public statements
- 🎛️ Persian keypad interface
- 🛡️ Operator panel for the running instance
- 💾 JSON save folder
war_game_v3/
Player
└─ Rubika chat + keypads
└─ bot.py
└─ GameDB
└─ war_game_v3/*.json
Button IDs route into country, army, market, diplomacy, research, and ranking flows. GameDB.save() writes the in-memory world back to disk. Secrets belong in environment variables, not in the source file.
World-War-Bot/
├── bot.py
├── war_game_v3/ # created at runtime — do not commit
└── README.md
bot.py is the application. The JSON folder holds players, taken countries, market prices, alliances, trade, statements, invites, and logs.
- Python 3.8+
rubka(Robot,Message,ChatKeypadBuilder)- asyncio
- JSON persistence
git clone https://github.com/sadra-hatami/World-War-Bot.git
cd World-War-Bot
pip install rubkapython bot.pyRUBIKA_BOT_TOKEN
RUBIKA_ADMIN_IDS
.gitignore:
.env
war_game_v3/
__pycache__/
- Put the token in the environment.
- Run
bot.py. - Open the bot in Rubika.
- Choose a server and a country.
- Use the keypad for army, market, diplomacy, research, and rank.
The operator panel opens from the private command پنل.
- Rubika communities that want a long strategy session
- Developers studying a large keypad-driven game bot
- Students building a games portfolio
- Split systems into packages
- Clearer notes per menu
- Safer default configuration
- Optional database backend
No. Group tools live in Rubika Group Bot and Rubika Advanced Group Bot.
Countries War Bot is the earlier nation game. This repository is the world-strategy build: servers, continents, market, diplomacy, research, invites, and a shared board.
Yes, when the war_game_v3/ folder stays on disk.
No. Use an environment variable only.
Bug reports, menu polish, and safer configuration are welcome.
Developer:
🌐 GitHub
This project is licensed under the MIT License.
© 2026 Sadra Hatami
All rights reserved.
If this bot belongs in a portfolio or a community, please consider giving it a ⭐ on GitHub.