Code Monkey home page Code Monkey logo

romposterbot's Introduction

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

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 name
  • DEVICE_NAME: Device name
  • CODENAME: Device codename
  • MAINTAINER_USERNAME: Telegram username without @
  • SUPPORT_GROUP: Telegram group username without @

Rom Configs

  • ROM_NAME: Rom name
  • ROM_VERSION: Rom version
  • ANDROID_VERSION: Rom android version
  • SOURCE_CHANGELOG_URL: URL of rom source changelog
  • BANNER_URL: Telegraph URL of your rom banner/photo
  • BUILD_DATE: Rom build date
  • BUILD_TYPE: Rom build type (Official/Unofficial)
  • XDA_POST: XDA post URL of rom
  • DOWNLOAD_URL: Download URL of rom
  • SCREENSHOT_URL: Screenshots URL of rom
  • MD5: MD5 checksum of rom
  • HASHTAGS: 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 token
  • CHAT_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

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

romposterbot's People

Contributors

prajjus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.