ircbot-0.6.2: A library for writing irc bots

Safe HaskellNone
LanguageHaskell98

Network.IRC.Bot.Parsec

Synopsis

Documentation

mapParsecT :: (Monad m, Monad n) => (m (Consumed (m (Reply s u a))) -> n (Consumed (n (Reply s u b)))) -> ParsecT s u m a -> ParsecT s u n b Source

nat :: Monad m => ParsecT ByteString () m Integer Source

parse a positive integer

botPrefix :: BotMonad m => ParsecT ByteString () m () Source

parser that checks for the cmdPrefix (from the BotEnv)

parsecPart :: BotMonad m => ParsecT ByteString () m a -> m a Source

create a bot part by using Parsec to parse the command

The argument to parsecPart is a parser function.

The argument to that parsec function is the target that the response should be sent to.

The parser will receive the msg from the PrivMsg.

see dicePart for an example usage.