Package: pogoraidbot
ImportantThe bot is now in beta versionDescriptionA telegram bot to organize PoGo raid that it can be self hosted.If you publish a raid screenshot in a group where this bot is present, it identifies the raid an provides you a poll to organize the raid.RequirementsPythonThe bot needs Python version 3.7 or newer.You can installpogoraidbotfrompypi:$pipinstallpogoraidbotTesseractThe bot needs an installation of Tesseract OCR and a pre-trained neural network for english. Both can be found from the official Arch and Ubuntu repositories.Refer to thislink.RedisThe bot requires a dedicated instance of Redis database.Refer to thislink.RunThe bot needs to know, the bot api token, that you can obtain from@BotFatherand the address of redis instance.To understand how to provide these information to the bot:$python3-mpogoraidbotusage:pogoraidbot[-h][-tTOKEN][-rREDIS][-aSUPERADMIN][-bBOSSES_FILE][-oBOSSES_EXPIRATION][-gGYMS_FILE][-yGYMS_EXPIRATION][-e][-dDEBUG_FOLDER][-v][--info][--debug]optionalarguments:-h,--helpshowthishelpmessageandexit-tTOKEN,--tokenTOKENtelegrambottoken-rREDIS,--redisREDISredisurlin"redis://{host}[:port]/{db}"format-aSUPERADMIN,--superadminSUPERADMINsuperadmin'sid-bBOSSES_FILE,--bosses-fileBOSSES_FILEJSONorCSVfilecontainspossiblepokémonsintheraids.Itcanbealsoprovidedoverhttp(s)-oBOSSES_EXPIRATION,--bosses-expirationBOSSES_EXPIRATIONValidityofthebosseslistinhours-gGYMS_FILE,--gyms-fileGYMS_FILEJSONfilecontainsgymsandtheircoordinates.Itcanbealsoprovidedoverhttp(s)-yGYMS_EXPIRATION,--gyms-expirationGYMS_EXPIRATIONValidityofthegymslistinhours-e,--envUseenvironmentvariablesfortheconfiguration-dDEBUG_FOLDER,--debug-folderDEBUG_FOLDERdebugfolder-vnumberof-vspecificslevelofverbosity--infoequalto-vv--debugequalto-vvvAn example:$python3-mpogoraidbot-t[BOT_TOKEN]-rredis://192.168.15.2:4044/3Dockerized version [recommended]RequirementsThe dockerized version of the bot requiresdockeranddocker-composeto work.Refer to thislink.InstallationYou can choose two kinds of setup:Use the image on Docker HubDownload.envanddocker-compose.yamlfiles and put them in a folder.Edit them to adapt the setup to your requirements(see below).Run the containers.docker-composeupCompile your own Docker imageClone the whole repo and init the submodule.gitclonehttps://github.com/RobertoBochet/pogoraidbot-dockerized.git./pogoraidbotcdpogoraidbot
gitsubmoduleupdate--initEdit the.envanddocker-compose.yamlto adapt the setup to your requirements(see below).Build and start the containers.docker-composebuild
docker-composeupConfigurationRequiredIn.envreplace:[BOT_TOKEN]with your bot's token[SUPERADMIN_ID]with the Telegram id of the main admin[TIME_ZONE]with your time zone (refer tothistable on columnTZ database name)OptionalAdd support to gym identificationIn.envset the envPGRB_BOT_GYMS_FILEwith the position of your gyms file.Add support to boss identificationIn.envset the envPGRB_BOT_BOSSES_FILEwith the position of your bosses file.Makeredisdata persistentUncomment the linecommand: ["redis-server", "--appendonly", "yes"]indocker-compose.yaml.If you want make the redis data persistent also to container destruction uncomment also thevolumessection of theredisservice and set the envPGRB_REDIS_PATH.Assign static IP for the virtual networkUncomment all the threenetworkssections indocker-compose.yamland set the three envPGRB_NETWORK_*withIPandsubnetin.env.CreditsIn this project are used the following Python libraries:python-telegram-bot(LGPLv3 License)opencv-python(MIT License)pytesseract(GPLv3 License)redis(MIT License)requests(Apache 2.0 License)