Giter Club home page Giter Club logo

telegram-bot's Introduction

telegram-bot

Simple python telegram bot using pyTelegramBotAPI

The bot will accept 5 commands /photo, /gif, /thougth, /help, /start

* /photo   [keywords to search] - will do a search at bing and will return a random result
* /gif     [keywords to search] - will do a search at giphy and will return a random result
* /thought - will return a random phrase
* /help    - show help
* /start   - show help

Requeriments

* python telegram api 
https://github.com/eternnoir/pyTelegramBotAPI

* other python libs  
beautifulsoup4 
urllib2
urllib
python-mysql.connector

Install

** If you are new with telegram bots read
   https://core.telegram.org/bots

* Install dependecies
* Create bot using the botfather https://telegram.me/botfather
* Rename the config.sample.py to config.py and complete it with your parameters
* Create directory pics/
* Create mysql database matching the name at config.py
* Run the sql/telebot.sql to create the database to storage phrases
* Choose a file from sql/phrases/ and configure it in sql/file2mysql.py
* Run sql/file2mysql.py to add phrases from sql/phrases to database

**NOTE: phrases used here are from fortune command

And that's pretty much it, enjoy.

telegram-bot's People

Contributors

narfeta avatar juhdin-nur 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.