lambdabot-core-5.3.1.2: Lambdabot core functionality

Safe Haskell | None
Language | Haskell98

Lambdabot.Command

# Documentation

data Command (m :: Type -> Type) Source #

Constructors

Command |

Fields

- cmdName :: String
- aliases :: [String]
- privileged :: Bool
- help :: Cmd m ()
- process :: String -> Cmd m ()

cmdNames :: forall (m :: Type -> Type). Command m -> [String] Source #

command :: String -> Command Identity Source #

runCommand :: (Monad m, Message a) => Command m -> a -> Nick -> String -> String -> m [String] Source #

data Cmd (m :: Type -> Type) a Source #

#### Instances

Instances details

MonadTransControl Cmd Source # |

Instance details

Defined in Lambdabot.Command

Associated Types

type StT Cmd a |
Instance details Defined in Lambdabot.Command type StT Cmd a = (a, [String])

Methods

liftWith :: Monad m => (Run Cmd -> m a) -> Cmd m a Source #

restoreT :: Monad m => m (StT Cmd a) -> Cmd m a Source #

MonadTrans Cmd Source # |
Instance details Defined in Lambdabot.Command Methods lift :: Monad m => m a -> Cmd m a Source #
MonadBaseControl b m => MonadBaseControl b (Cmd m) Source # |
Instance details Defined in Lambdabot.Command Methods liftBaseWith :: (RunInBase (Cmd m) b -> b a) -> Cmd m a Source # restoreM :: StM (Cmd m) a -> Cmd m a Source #
MonadBase b m => MonadBase b (Cmd m) Source # |
Instance details Defined in Lambdabot.Command Methods liftBase :: b α -> Cmd m α Source #
MonadIO m => MonadIO (Cmd m) Source # |
Instance details Defined in Lambdabot.Command Methods liftIO :: IO a -> Cmd m a Source #
Applicative f => Applicative (Cmd f) Source # |
Instance details Defined in Lambdabot.Command Methods pure :: a -> Cmd f a Source # (<*>) :: Cmd f (a -> b) -> Cmd f a -> Cmd f b Source # liftA2 :: (a -> b -> c) -> Cmd f a -> Cmd f b -> Cmd f c Source # (*>) :: Cmd f a -> Cmd f b -> Cmd f b Source # (<*) :: Cmd f a -> Cmd f b -> Cmd f a Source #
Functor f => Functor (Cmd f) Source # |
Instance details Defined in Lambdabot.Command Methods fmap :: (a -> b) -> Cmd f a -> Cmd f b Source # (<$) :: a -> Cmd f b -> Cmd f a Source #
Monad m => Monad (Cmd m) Source # |
Instance details Defined in Lambdabot.Command Methods (>>=) :: Cmd m a -> (a -> Cmd m b) -> Cmd m b Source # (>>) :: Cmd m a -> Cmd m b -> Cmd m b Source # return :: a -> Cmd m a Source #
MonadFail m => MonadFail (Cmd m) Source # |
Instance details Defined in Lambdabot.Command Methods fail :: String -> Cmd m a Source #
MonadConfig m => MonadConfig (Cmd m) Source # |
Instance details Defined in Lambdabot.Command Methods getConfig :: Config a -> Cmd m a Source #
MonadLogging m => MonadLogging (Cmd m) Source # |
Instance details Defined in Lambdabot.Command Methods getCurrentLogger :: Cmd m [String] Source # logM :: String -> Priority -> String -> Cmd m () Source #
MonadLB m => MonadLB (Cmd m) Source # |
Instance details Defined in Lambdabot.Monad Methods lb :: LB a -> Cmd m a Source #
MonadLBState m => MonadLBState (Cmd m) Source # |

Instance details

Defined in Lambdabot.State

Associated Types

type LBState (Cmd m) |
Instance details Defined in Lambdabot.State type LBState (Cmd m) = LBState m

Methods

withMS :: (LBState (Cmd m) -> (LBState (Cmd m) -> Cmd m ()) -> Cmd m a) -> Cmd m a Source #

type StT Cmd a Source # |
Instance details Defined in Lambdabot.Command type StT Cmd a = (a, [String])
type LBState (Cmd m) Source # |
Instance details Defined in Lambdabot.State type LBState (Cmd m) = LBState m
type StM (Cmd m) a Source # |
Instance details Defined in Lambdabot.Command type StM (Cmd m) a = ComposeSt Cmd m a

execCmd :: (Monad m, Message a) => Cmd m t -> a -> Nick -> String -> m [String] Source #

getCmdName :: forall (m :: Type -> Type). Monad m => Cmd m String Source #

withMsg :: forall (m :: Type -> Type) t. Monad m => (forall a. Message a => a -> Cmd m t) -> Cmd m t Source #

readNick :: forall (m :: Type -> Type). Monad m => String -> Cmd m Nick Source #

showNick :: forall (m :: Type -> Type). Monad m => Nick -> Cmd m String Source #

getServer :: forall (m :: Type -> Type). Monad m => Cmd m String Source #

getSender :: forall (m :: Type -> Type). Monad m => Cmd m Nick Source #

getTarget :: forall (m :: Type -> Type). Monad m => Cmd m Nick Source #

getLambdabotName :: forall (m :: Type -> Type). Monad m => Cmd m Nick Source #

say :: forall (m :: Type -> Type). Monad m => String -> Cmd m () Source #