Safe Haskell | None |
---|---|
Language | Haskell2010 |
Network.IRC.Bot.Commands
Contents
Synopsis
- type HostName = ByteString
- cmd :: (Functor m, MonadPlus m, BotMonad m) => Command -> m ()
- data Ping = Ping HostName
- ping :: (Functor m, MonadPlus m, BotMonad m) => m Ping
- data PrivMsg = PrivMsg {
- prefix :: Maybe Prefix
- receivers :: [ByteString]
- msg :: ByteString
- privMsg :: (Functor m, MonadPlus m, BotMonad m) => m PrivMsg
- toPrivMsg :: Message -> Maybe PrivMsg
- class ToMessage a where
- toMessage :: a -> Message
- sendCommand :: (ToMessage c, BotMonad m, Functor m) => c -> m ()
- data Pong = Pong HostName
- askSenderNickName :: BotMonad m => m (Maybe ByteString)
- replyTo :: BotMonad m => m (Maybe ByteString)
- askReceiver :: (Alternative m, BotMonad m) => m (Maybe ByteString)
Documentation
type HostName = ByteString Source #
Commands
Instances
Eq Ping Source # | |
Data Ping Source # | |
Defined in Network.IRC.Bot.Commands Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Ping -> c Ping Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Ping Source # toConstr :: Ping -> Constr Source # dataTypeOf :: Ping -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Ping) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Ping) Source # gmapT :: (forall b. Data b => b -> b) -> Ping -> Ping Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Ping -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Ping -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Ping -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Ping -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Ping -> m Ping Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Ping -> m Ping Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Ping -> m Ping Source # | |
Ord Ping Source # | |
Defined in Network.IRC.Bot.Commands | |
Read Ping Source # | |
Show Ping Source # | |
Constructors
PrivMsg | |
Fields
|
Instances
Eq Pong Source # | |
Data Pong Source # | |
Defined in Network.IRC.Bot.Commands Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Pong -> c Pong Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Pong Source # toConstr :: Pong -> Constr Source # dataTypeOf :: Pong -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Pong) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Pong) Source # gmapT :: (forall b. Data b => b -> b) -> Pong -> Pong Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Pong -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Pong -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Pong -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Pong -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Pong -> m Pong Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Pong -> m Pong Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Pong -> m Pong Source # | |
Ord Pong Source # | |
Defined in Network.IRC.Bot.Commands | |
Read Pong Source # | |
Show Pong Source # | |
ToMessage Pong Source # | |
Defined in Network.IRC.Bot.Commands |
askSenderNickName :: BotMonad m => m (Maybe ByteString) Source #
get the nickname of the user who sent the message
replyTo :: BotMonad m => m (Maybe ByteString) Source #
figure out who to reply to for a given Message
If message was sent to a #channel reply to the channel. Otherwise reply to the sender.
askReceiver :: (Alternative m, BotMonad m) => m (Maybe ByteString) Source #
returns the receiver of a message
if multiple receivers, it returns only the first