marvin-0.0.5: A modular chat bot

Copyright(c) Justus Adam 2016
LicenseBSD3
Maintainerdev@justus.science
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Marvin.Adapter

Description

 

Synopsis

Documentation

data Event Source #

Representation for the types of events which can occur

type EventHandler a = Event -> IO () Source #

class IsAdapter a where Source #

Basic functionality required of any adapter

Methods

adapterId :: AdapterId a Source #

Used for scoping config and logging

messageChannel :: a -> Channel -> Text -> RunnerM () Source #

Post a message to a channel given the internal channel identifier

runWithAdapter :: RunWithAdapter a Source #

Initialize and run the bot

getUsername :: a -> User -> RunnerM Text Source #

Resolve a username given the internal user identifier

getChannelName :: a -> Channel -> RunnerM Text Source #

Resolve the human readable name for a channel given the internal channel identifier

resolveChannel :: a -> Text -> RunnerM (Maybe Channel) Source #

Resolve to the internal channel identifier given a human readable name