Update to new yaboli version
[testbot] Add echo command that works like Sumairu's
This commit is contained in:
parent
6c28d16a6e
commit
b93f7f38ec
6 changed files with 29 additions and 16 deletions
|
|
@ -38,7 +38,7 @@ infoBot mPasswd = do
|
|||
|
||||
botMain :: MVar BotState -> Client T.Text ()
|
||||
botMain stateVar = forever $ do
|
||||
event <- respondingToCommands (getCommands stateVar) $
|
||||
event <- respondingToCommand (getCommand stateVar) $
|
||||
respondingToPing nextEvent
|
||||
updateFromEventVia botListing stateVar event
|
||||
updateNick stateVar
|
||||
|
|
@ -61,11 +61,11 @@ longHelp = T.concat
|
|||
, "Source code available at https://github.com/Garmelon/haboli-bot-collection."
|
||||
]
|
||||
|
||||
getCommands :: MVar BotState -> Client e [Command T.Text]
|
||||
getCommands stateVar = do
|
||||
getCommand :: MVar BotState -> Client e (Command T.Text)
|
||||
getCommand stateVar = do
|
||||
state <- liftIO $ readMVar stateVar
|
||||
let name = state ^. botListing . lsSelfL . svNickL
|
||||
pure
|
||||
pure $ cmdSequential
|
||||
[ botrulezPingGeneral
|
||||
, botrulezPingSpecific name
|
||||
, botrulezPingSpecific "InfoBot"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue