Coder Social home page Coder Social logo

zirochkaa / gif-sender-bot Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 130 KB

Telegram bot designed for sending specific GIF to annoying person or even people.

Home Page: https://t.me/GIFSenderBot

License: MIT License

Python 100.00%
pet-project telegram-bot

gif-sender-bot's Introduction

pytest

GIF Sender

This repository contains pet project - telegram bot designed for sending specific GIF to annoying person or even people :)

Link to the working telegram bot here - @GIFSenderBot (currently shut down).

Run project locally

  1. Setup and activate your local python environment. Here are few guides on how to do it.
  2. Install requirements:
    pip install -r requirements-ci.txt
  3. Create .env file:
    cp app/.env.template app/.env
  4. Update TELEGRAM_USERNAMES in .env file - it should contain comma separated list of usernames (like username1,username2,username3) to which bot will respond.
  5. Obtain Telegram Bot Token by creating Telegram Bot. Here (Obtain Your Bot Token section) is a guide on how to do it. Update TELEGRAM_BOT_TOKEN in .env file.
  6. This app uses a webhook approach to processing bot updates. In order to do it your localhost has to be put on the internet. You can achieve this by using ngrok. You need to install it and run:
    ./ngrok http 8000
    After running above command you will see something like this:
image

You will need to copy Forwarding part (for example, on the screenshot it will be https://03d2-146-70-181-35.ngrok-free.app) and update APP_BASE_URL in .env file.

  1. It's time to run application:
    uvicorn app.run:app --reload
  2. Go to 127.0.0.1:8000 in your web browser.

Tests

To run tests use following command:

pytest tests/

If you want to check code coverage use following command:

pytest --cov-config=.coveragerc --cov=app tests/

gif-sender-bot's People

Contributors

zirochkaa 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.