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.
Fork the repo and make a file named config.env
by using sample_config.env
and fill up all the vars
Bot Configs
WITH_BUTTONS
: 'True' if you want to post rom banner with buttons and 'False' if you want to post rom banner without buttons (Default is True)
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 romSCREENSHOT_URL
: Screenshots 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
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(You can even add multiple chat IDs by seperating them with space, Examples:-0123456789 -69696969 -1003512356
)
Note: Bot should be added in the group/channel where the rom needs to be posted
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
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