Code Monkey home page Code Monkey logo

fabiosangregorio / telereddit Goto Github PK

View Code? Open in Web Editor NEW
17.0 4.0 3.0 766 KB

Telereddit is a Telegram bot which lets you easily see shared Reddit posts previews directly in the chat. This bot will also automatically send a random post from a subreddit when you name it.

Home Page: https://fabiosangregorio.github.io/telereddit/

License: GNU General Public License v3.0

Python 99.55% Shell 0.45%
reddit bot telegram-bot telegram reddit-bot python-telegram-bot personal

telereddit's Introduction

telereddit

Telereddit

Docs status Test status Lint status Coverage Status Codacy Badge Maintainability Docs coverage Code style: black

Add this bot on Telegram: telegram.me!

Telereddit is a Telegram bot which lets you easily see shared Reddit posts previews directly in the group chat. This bot will also automatically send a random post from a subreddit when you name it.

Like the project?

Buy Me A Coffee

Features

Post sharing

Post sharing

Random post from a subreddit

Random post from a subreddit

Get it on telegram.me!

Installation

  1. Clone the repository
  2. Install requirements
    pip install -r requirements.txt
  3. Set up Telegram token and API keys by duplicating and filling out ./telereddit/config/template.env
  4. Set the environment variable REDDIT_BOTS_MACHINE to the name of the env file (e.g.: for dev.env set REDDIT_BOTS_MACHINE=DEV)
  5. Start the bot
    python -m telereddit
  6. Enjoy

Bugs and feature requests

If you want to report a bug or would like a feature to be added, feel free to open an issue.

Versioning

We follow Semantic Versioning. The version X.Y.Z indicates:

  • X is the major version (backward-incompatible),
  • Y is the minor version (backward-compatible), and
  • Z is the patch version (backward-compatible bug fix).

License

GPL v3 - Copyright 2020 © fabio.sangregorio.dev.

telereddit's People

Contributors

fabiosangregorio avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

telereddit's Issues

BadRequest: Message is not modified: specified new message content and reply markup are exactly the same as a current content and reply markup of the message

Sentry Issue: TELEREDDIT-7Z

BadRequest: Webpage_media_empty
(2 additional frame(s) were not displayed)
...
  File "telegram/bot.py", line 67, in decorator
    result = func(*args, **kwargs)
  File "telegram/bot.py", line 2020, in edit_message_media
    return self._message(url, data, timeout=timeout, reply_markup=reply_markup, **kwargs)
  File "telegram/bot.py", line 175, in _message
    result = self._request.post(url, data, timeout=timeout)
  File "telegram/utils/request.py", line 328, in post
    result = self._request_wrapper('POST', url, fields=data, **urlopen_kwargs)
  File "telegram/utils/request.py", line 244, in _request_wrapper
    raise BadRequest(message)

Improve reliability

The bot has some unexpected downtime (see #37), especially during deployment. Reliability needs to be improved.

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.