lambdabot-telegram-plugins-0.2.0: Lambdabot for Telegram
Safe HaskellNone
LanguageHaskell2010

Lambdabot.Plugin.Telegram.Message

Synopsis

IRC Messaging

makeIrcMessage :: Text -> Text -> Text -> IrcMessage Source #

IRC communicating model consists of the core and plugins which are sending messages to each other.

Telegram module --- Lambdabot core module ------ Haskell/Telegram module

In order to pass Telegram-related necessary information for responding, we are embedding Telegram metadata into IrcMessage inside ircMsgPrefix: "null!n=user@" + chatId + "/" + msgId

getTgChatId :: IrcMessage -> Text Source #

To extract Telegram chatId from IrcMessage.

getTgMsgId :: IrcMessage -> Text Source #

To extract Telegram msgId from IrcMessage.

tgIrcPrivMsg :: Text -> Text -> Text -> LB () Source #

Send privileged IRC Message across modules.

ldebug :: String -> Telegram () Source #

Debug helper function.