Giter Club home page Giter Club logo

word_of_a_day_bot's Introduction

word_of_a_day_bot

Simple Telegram bot which sends you english 'word of a day' with it's definition

  • Possibilities:
    1. Send word of a day.
    2. Set daily timer for sending word of a day in chat.
    3. Translate words from english to russian and vice versa.
  • Wod_parser: module with parsing functions using 'requests' lib.
    • There are presented different parsing functions to work with wod_bot.py
    • Each function parses text.data from prepared url links of 'word of a day' and 'english-russian translator' websites.
    • Then drops useless data from html and prepare text information for exporting in word_bot for Telegram bot uses.
  • Wod_bot: module with bot logic.
    • First, a few handler functions are defined.
    • Then, those functions are passed to the Dispatcher and registered at their respective places.
    • After that the bot is started and runs until we press Ctrl-C on the command line.
    • Make sure to replace TOKEN in 'main()' function row: 'updater = Updater(TOKEN)' with 'token' provided by BotFather
Note: Press Ctrl-C on the command line or send a signal to the process to stop the bot.
To learn how to add Bot via BotFather in Telegram (visit https://core.telegram.org/bots to learn how to create bot with Telegram's BotFather

If you want to deploy it via docker:


  • Make sure that Docker process is running and use command:
    docker pull skrubber/wod_bot_image:latest
  • After downloading of image use following template of run command:

    Note:
    Text in square brackets such as "[bracket text]" could be replaced with your values or ignored.
    Text in round brackets such as "{TOKEN or PORT} must be presented and replased by your values!"


    docker run -d [--name wod_bot] -p {8080}:80 -e TO_BOTFATHER={"some_token:123133515"} skrubber/wod_bot_image:latest

    Note:
    If container stops immediatly add tail -f /dev/null in the end of docker run command.


  • Add Bot via BotFather in Telegram (visit https://core.telegram.org/bots to learn how to create bot with Telegram's BotFather
Feel free to inspect Dockerfile to alter image if needed

word_of_a_day_bot's People

Contributors

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