Hello EarthMC players & developers, glad to bring Vector to EMC Community. Today it's running on 30 Discord servers for free and soon there will be more developers join us. We can not only enjoy the game, we can also enjoy the joy of writing code. So, I decide to open-source my code for reference and discussion to avoid reinventing the wheel. I hope everyone can help me improve the code. Thanks for your support.
Main Structure: Vector/Pinned-Vector <=> Search-Engine
1.1 Vector structure/ Based on Plunkten
./
|-- Commands # Based on Plunkten.
| |-- NationCommand.py
| |-- ResCommand.py
| |-- ServerCommand.py
| `-- TownCommand.py
|-- Utils
| `-- Utils.py # Tools.
|-- keep_alive.py # Optional. Free cloud server like replit, will need this.
|-- logs
| `-- cemetery.txt # Store fallen towns that have been outputted.
| |-- nations.txt
| `-- towns.txt
|-- main.py
|-- requirements.txt
|-- Vector.env # Store secrets like TOKEN..
`-- start.sh1.2 Pinned-Vector structure/ Based on Vector
./
|-- Utils.py # Tools.
|-- keep_alive.py # Optional. Free cloud server like replit, will need this.
`-- main.py # Updating pinned message about wilderness victims.2.1 Search engine structure/
./
|-- data # Temporarily store the result here in order to prevent Vector get Updating empty *.txt
| |-- cemetery.txt
| |-- nations.txt
| `-- towns.txt
|-- logs # Vector request the data from here.
| |-- cemetery.txt
| |-- nations.txt
| `-- towns.txt
|-- main.py # Request data every 30 mins and write analysis result to /data/*.txt and /logs/*.txt.
`-- restart6h.sh # Restart main.py every 6 hours in case main.py accidently crash.Any ideas or issues, feel free to contact me.
