Giter VIP home page Giter VIP logo

python-telegram-bot's Introduction

python-telegram-bot

This is a telegram bot written in python. It uses the CLI of telegram by vysheng to connect.

Installation

Install and setup vysheng/tg

Install vysheng's tg cli

git clone https://github.com/vysheng/tg.git && cd tg
./configure
make

Run that and configure an account

./telegram -k tg-server.pub

Install dependencies

The twitter module requires Python Twitter Tools

sudo easy_install twitter
twitter authorize

Download python-telegram-bot

Clone this repository by doing

git clone https://github.com/asdofindia/python-telegram-bot.git && cd python-telegram-bot

Configure python-telegram-bot

There are a few changes to be made to the source code before it can start working.

In bot.py, change pathtotg to the path to the vysheng's tg CLI In bot.py, in the twitter function, change groupeer to the telegram user to whom you want the bot to send a message when there's a new tweet. In bot.py, in the twitter function, change the follow array to the accounts you want to get updates from In wolfram.py, put an appid by signing up at wolfram developers

Disabling modules

If you don't want some of these modules, just remove them from the modules array in callmodule function If you want to disable twitter, just comment out all lines with 'twitbot' in it in the main function. If you want to disable robotic replies turn chattybot to False

Features

The features as of now are

  • can be invoked from within a group or a direct message
  • wiki will return the first paragraph of the wikipedia article
  • google will return a few google results
  • bot will fetch the answer from wolfram alpha api
  • new twitter messages from your feed are automatically sent to the defined peer
  • talks random shit based on pandorabots web service thanks to chatterbotapi

Known Bugs

  • twitter module repeats tweets. This is more of a problem with the twitter python module rather than this code. Todo: prevent duplicate tweets using timestamp
  • chatting with oneself is buggy, I suppose. Not tested very much. No time :P

python-telegram-bot's People

Contributors

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