Giter VIP home page Giter VIP logo

petrovich's Introduction

Telegram Bot Petrovich

Petrovich. Radosti skupyye telegrammy

A Telegram bot running with RSS and VK group integration and ready to deploy with Heroku.

Features

  1. Bot support commands:
  • /last - send to user last 5 posts
  • /search %search_word% - send all posts with %search_word%
  • /random - send random post
  • /off - turn off auto broadcasting
  • /on - turn on auto broadcasting
  • /daily - turn off daily broadcasting. You can set time in config.py
  • /hourly - turn off hourly broadcasting.
  • /help - just send help info
  1. Bot can work with multiply channels. For example /last ege retrieve 5 posts from ege channel
  2. Bot using botan.io for collecting statistic.

Installation

  1. Deploy
  2. Create the bot on Telegram (just say /newbot to BotFather)
  3. Update config.py with your information (tokens, keys, etc)
  4. Uncomment last 2 lines of the bot.py script and push all changes to Heroku
  5. Run heroku run python ./bot/bot.py`. It should set new webhook to Heroku server
  6. Revert bot.py script back and push all changes to Heroku
  7. Schedule (I using Heroku Scheduler) VK parser for broadcast posts from your public to users and database cleaner for long support. I use python ./bot/broadcaster.py every 10 minutes for Brodcaster and if [ "$(date +%d)" = 01 ]; then python ./bot/cache_cleaner.py; fi for Database Cleaner
  8. That's it!

This repo used by:

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.