a whiteout survival giftcode redeemer + utility bot using ddddocr for captcha detection
this bot is not related to relo's bot in any way.
if you like the project, please give it a ⭐! 😊
this bot uses an onnx based OCR model which is not only fast, but is ~50MB in size, meaning the bot runs at under 100MB of RAM, and doesn't need any special hardware such as a CUDA supported GPU. this also means that the storage space needed is <1GB, allowing it to be run on a cheap VPS, a free one, or even on small SBCs.
please report any issues by creating an issue on github or messaging me on discord @zenpaiang
Note
if you are migrating from v1, head to migration
- clone the repo:
git clone https://github.com/zenpaiang/wos-bot.git - configure the bot's
config.json - rename
players.example.jsontoplayers.json - install dependencies
pip install -r requirements.txtorpip3 install -r requirements.txt - run the bot using
python bot.pyorpython3 bot.py
Tip
if you're on python 3.13 and above, run pip install -r requirements.txt --ignore-requires-python for step 4 instead. this is a temporary workaround.
configuration is done by renaming config.example.json to config.json, which has 7 values to configure
{
"token": "[PUT YOUR BOT TOKEN HERE]",
"admins": [],
"players_file": "players.json",
"bot_owner": 0,
"auto_rename_users_during_redemption": true,
"sync_discord_usernames": false,
"redeem_locked_to_admins": false,
"members_lock_to_admins": true
}token: your bot token. for instructions on how to obtain one, click here
admins: this value is configured inside the bot
players_file: this value stores the path to the players database. do not change if you don't know what you're doing.
bot_owner: put your discord user ID here. for instructions on how to get it, click here
auto_rename_users_during_redemption: this value is configured inside the bot with /admin settings. it controls whether to automatically rename users in your database during redemption.
sync_discord_usernames: this value is configured inside the bot with /admin settings. it controls whether the bot will sync wos usernames to linked discord users. (note: this feature is currently under development and does not work.)
redeem_locked_to_admins: this value is configured inside the bot with /admin settings. it controls whether /redeem is usable by non-admins
members_lock_to_admins: this value is configured inside the bot with /admin settings. it controls whether /giftcode users is usable by non-admins
Caution
doing this WILL override your old players.json file so if for whatever reason you still want the old version, please make a backup before doing this.
after cloning this repository:
- copy your old
players.jsonfile into the directory - run the migration tool
python migration_tool.py
view the commands and features list here