Git Product home page Git Product logo

tg-bot's Introduction

#Telegram Bot A lua script for the Telegram CLI.

###Install put this script dir inside the ~/.telegram/ .
Change the lua script according to what you need.
Check the config file.

###Usage The config file is dynamically read everytime a message is received.
Thus, enabling away mode in the config file will directly take effect.
The last line of the config is the away message.

	help()            : Display this usage information
	dice()            : Returns a random number 1-6
	quote()           : Returns a random fortune cookie quote
	ping()            : Pong back
	weather()         : Returns the weather status
	md5(string)       : Returns the md5 hash of the string
	sha256(string)    : Returns the sha256 of the string
	define(word)      : Returns the definition of a word
	cleverbot(string) : Ask the cleverbot something
	note(something)   : If away, it will save a note for me

###Deps There are a lot of dependencies due to the main script calling multiple external programs.

Namely, you'll need:

node
(for the 2 node scripts that comes with this repo)
nmh used for notes received as email 
(I read them with sylpheed but you can use any mail client you prefer)
fortune
A file that has the weather in it 
(I'm taken it from another script I wrote to update me about the weather)
curl
A notification script 
(Also comes with this repo, but you can use any other notification system
Note that the notif script depends on bar and beep)

tg-bot's People

Stargazers

Alexander Salas Bastidas avatar Katie avatar ░▒▓█│【Walkman】│█▓▒░ avatar Yeono Park 박연오 avatar Mohammad Reza Taesiri avatar Dray avatar  avatar  avatar

Watchers

James Cloos avatar  avatar ░▒▓█│【Walkman】│█▓▒░ avatar  avatar

tg-bot's Issues

Bot does nothing

Hello.
My bot isn't working. Probably I made something wrong:

  • Git cloned and put scripts dir inside ~./telegram-cli/ folder
  • Changed lua file (actually only the id)
  • started telegram but nothing happens.

How can I debug it?

Empty message

Hey I really like the idea of the clever bot lua you have in this. But i cant seem to make it work with the cleverbot() command as I'm getting empty message error.

Cheers

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.