The danibot package

[Tags:library, mit, program]

[Skip to Readme]


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
Category Network
Bug tracker
Source repository head: git clone
Uploaded Sat Mar 19 08:43:23 UTC 2016 by DanielDiazCarrete
Distributions NixOS:
Downloads 49 total (3 in the last 30 days)
0 []
Status Docs uploaded by user
Build status unknown [no reports yet]




Maintainer's Corner

For package maintainers and hackage trustees

Readme for danibot

Readme for danibot-

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.