danibot: Basic Slack bot framework.

[ library, mit, network, program ] [ Propose Tags ]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS]
Change log CHANGELOG
Dependencies aeson (>=, async (>=2.1.0), attoparsec (>=0.13), base (>=4.7 && <5), bytestring (>=, conceit (>=, containers (>=0.5), danibot, foldl (>=1.1.5), lens (>=4.5), lens-aeson (>=, monoid-subclasses (>=0.4.2), network (>=2.6), optparse-applicative (>=, stm (>=2.4.4), streaming (>=0.1.4), text (>=, transformers (>=, websockets (>=, wreq (>=, wuss (>=1.0.2) [details]
License MIT
Copyright 2015 Daniel Diaz
Author Daniel Diaz
Maintainer diaz_carrete@yahoo.com
Category Network
Bug tracker https://github.com/danidiaz/danibot/issues
Source repo head: git clone git@github.com:danidiaz/danibot.git
Uploaded by DanielDiazCarrete at 2016-03-19T08:43:23Z
Executables danibot
Downloads 853 total (3 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for danibot-

[back to package description]

A very basic framework for creating Slack bots.

The bot will respond to messages in IM channels, and also to messages explicitly directed at him in general channels (@nameofthebot: some message).

The bot reads the Slack api token from the environment variable "DANIBOT_SLACK_API_TOKEN".

The default danibot executable comes with a few example handlers:

  • up? host port

    Checks if a port is open in a host.

  • lookup key

    Checks the value of key in a dictionary that is loaded at startup with the --dict parameter. The dictionary is a json object with string values.

  • help

    Lists available options.

Right now the bot ignores most chat events apart from messages.

To create your own customized bot, import Network.Danibot.Main and pass a value of type IO (Either String (Text -> IO Text)) to mainWith, where Text -> IO Text is the type of the handler function.