GithubHelp home page GithubHelp 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:

petrovich's People

Contributors

jastkand avatar vizigin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

petrovich's Issues

По кнопке сделать deploy не получается

У меня по кнопке сделать deploy не получается.

Ошибки:

  1. App creation failed. Please ensure you have valid values in the above form fields.
  2. Couldn't find either the add-on service or the add-on plan of "scheduler:standart".
    create new app heroku failed

Heroku - Build app arror

В финальной фазе сборки появляется сообщение:
Error: could not determine PostgreSQL version from '10.4'
проблема решается изменением psycopg2 на 2.7.1 в файле requirements.txt, но появляется другая ошибка:
AttributeError: module 'enum' has no attribute 'IntFlag'

WebHook

Не могли бы Вы пояснить, хотя бы вкратце, как работает WebHook и в каком виде ему приходят данные? (сейчас использую GetUpdates)

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.