Rom Poster Bot
A simple Post Bot written in Python using pyTelegramBotAPI to post rom updates to telegram whenever you need. Made by lazy peep for lazy peeps.
How to use
1. Filling up config
Fork the repo and make a file named config.env
by using sample_config.env
and fill up all the vars
Main Configs
BRAND
: Device brand nameDEVICE_NAME
: Device nameCODENAME
: Device codenameMAINTAINER_USERNAME
: Telegram username without @SUPPORT_GROUP
: Telegram group username without @
Rom Configs
ROM_NAME
: Rom nameROM_VERSION
: Rom versionANDROID_VERSION
: Rom android versionSOURCE_CHANGELOG_URL
: URL of rom source changelogBANNER_URL
: Telegraph URL of your rom banner/photoBUILD_DATE
: Rom build dateBUILD_TYPE
: Rom build type (Official/Unofficial)XDA_POST
: XDA post URL of romDOWNLOAD_URL
: Download URL of romMD5
: MD5 checksum of romHASHTAGS
: Hashtags for rom post
Optional Configs
STICKER_ID
: Telegram sticker ID (If added, the bot first sends sticker then the rom post)CUSTOM_MESSAGE
: Custom message to add at the end of rom post
2. Adding secrets
After filling up config go to your repo settings > secrets > new repository secret
, then you need to add two secrets
BOT_TOKEN
: Telegram bot tokenCHAT_ID
: Telegram group/channel chat ID where the rom needs to be posted
Note: Bot should be added in the group/channel where the rom needs to be posted
3. Adding changelog and notes
After filling up repository secrets the add the following things
- Device side changelog in
changelog.txt
file - Notes for the rom users in
notes.txt
file
4. Running the bot
After adding changelog and notes the last thing that remains is to run the bot.
We use Github Actions to run the bot
- Actions will automatically run after modifying changelog.txt and the rom will be posted
- You can also run the bot but going to
actions > Rom Poster Bot Runner > workflow-dispatch
and tap on run
Note: After posting the bot pins the message too