Giter Site home page Giter Site logo

lulzrobot's Introduction

lulzbot Telegram Bot - @lulzbot

This bot is using Telegram bot API. It has lot of features. The concept is driven from IRC bot that I used to use for my IRC channels. Look at the commands below to know how to use it.

Version: 0.0.4

##Features (Updated as of v0.0.4)

Commands argument Function Example
/help Displays list of Commands /help
/google keyword Google search by keyword /google terminator
/wiki keyword Lookup for wikipedia article /wiki Anaconda
/github username Get recent activity of user /github Bhavyanshu
/translate from to "strng" Microsoft translate /translate en hi "I'm good"
/hon Get random Imgur r/models post and start HotOrNot /hon or /hotornot
/tw username Get tweets of twitter user /tw nasa
/tt country Get trending tags by country /tt India
/ts keyword Get latest tweets by keyword (Hashtag) /ts #privacy
/yt keyword string Search youtube for video /yt Iron Maiden
/cats Get a random cat pic /cats
/weather city,state Get weather update for city /weather paris
/giphy keyword Get gif from giphy /gif awesome
/img keyword Get topmost bing image search result /img give that man a cookie
/calc expression Calculate math expressions /calc 2+2

Note that some features of the actual bot @lulzbot registered on telegram will be missing from here. Like bot administration commands and commands meant for my own personal use. However, they do not break this code nor do they in any way affect the working on this code. They are completely unrelated modules. On request, I can explain how you can write bot administration commands for Telegram bot API.

As of April, I have removed instagram support because Instagram API is being too restrictive now. Hot or Not game is now using imgur r/models

##Derive your own bot from this

  1. First open data/config.ini file and add all the required API keys from various social media sites. For telegram token, contact @BotFather on telegram and create a new bot there. @BotFather will reply provide you the token once the bot is created.

  2. Then you need to make sure you have all the required dependencies. Python 2.7 is required. Apart from that I have provided requirements.txt file and pip command should be able to fetch it all for you.

     $ pip install -r requirements.txt
    
  3. For debugging, run using python bot.py. If there is a crash, it won't restart. Test all the commands.

  4. For production mode, run ./botmon.sh which will restart bot if it crashes.

  5. Now you can make any changes you want and use it as your own bot in telegram.

##LICENSE

Copyright (C) 2015 Bhavyanshu Parasher

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

##Contribute

Create an issue if you find any bug. If you want to improve something, send a pull request.

lulzrobot's People

Contributors

bhavyanshu avatar

Watchers

James Cloos avatar  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.