Skip to content

Commit c304dc2

Browse files
committed
Only formatted code allowed
1 parent 0b3f322 commit c304dc2

2 files changed

Lines changed: 9 additions & 14 deletions

File tree

src/Bot.hs

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,7 @@ builtinCommands =
112112
cmapR (const ()) updateBttvEmotesCommand))
113113
, ( "help"
114114
, mkBuiltinCommand
115-
( "Send help"
116-
, $githubLinkLocationStr
117-
, helpCommand builtinCommands))
115+
("Send help", $githubLinkLocationStr, helpCommand builtinCommands))
118116
, ( "poll"
119117
, mkBuiltinCommand
120118
( "Starts a poll. !poll <duration:secs> option1; option2; ...; option3"
@@ -226,15 +224,13 @@ builtinCommands =
226224
, authorizeSender senderAuthority $
227225
replyOnNothing "Only for mods" $
228226
regexArgs "([a-zA-Z0-9]+) ?(.*)" $
229-
replyLeft $
230-
pairArgs $ replyLeft $ addCustomCommand builtinCommands))
227+
replyLeft $ pairArgs $ replyLeft $ addCustomCommand builtinCommands))
231228
, ( "delcmd"
232229
, mkBuiltinCommand
233230
( "Delete custom command"
234231
, $githubLinkLocationStr
235232
, authorizeSender senderAuthority $
236-
replyOnNothing "Only for mods" $
237-
deleteCustomCommand builtinCommands))
233+
replyOnNothing "Only for mods" $ deleteCustomCommand builtinCommands))
238234
, ( "updcmd"
239235
, mkBuiltinCommand
240236
( "Update custom command"
@@ -406,9 +402,7 @@ builtinCommands =
406402
, mkBuiltinCommand
407403
( "Suggest video for the friday stream"
408404
, $githubLinkLocationStr
409-
, nonEmptyRoles
410-
411-
fridayCommand))
405+
, nonEmptyRoles fridayCommand))
412406
, ( "videoq"
413407
, mkBuiltinCommand
414408
( "Get the link to the current Friday Queue"
@@ -631,7 +625,7 @@ mention =
631625
bot :: Bot
632626
bot Started = do
633627
startRefreshFridayGistTimer
634-
startRefreshHelpGistTimer builtinCommands
628+
startRefreshHelpGistTimer builtinCommands
635629
-- TODO(#656): Restarted Twitch transport thread can duplicate timers
636630
bot (Joined channel@(TwitchChannel _)) = do
637631
startPeriodicCommands channel dispatchCommand

src/Bot/Replies.hs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,15 @@ nonEmptyRoles reaction =
8686
(null . senderRoles . messageSender)
8787
(Reaction noTrust)
8888
(cmapR extract reaction)
89-
89+
9090
noTrust :: Message a -> Effect ()
9191
noTrust msg = replyToSender (messageSender msg) reply
9292
where
93-
reply = [qms|You have to be trusted to use this command.
93+
reply =
94+
[qms|You have to be trusted to use this command.
9495
Subscribe to gain the trust instantly:
9596
https://twitch.tv/{channel'}/subscribe|]
96-
channel' = unChannel $ channelToName $ senderChannel $ messageSender msg
97+
channel' = unChannel $ channelToName $ senderChannel $ messageSender msg
9798

9899
onlyForTwitch :: Reaction Message a -> Reaction Message a
99100
onlyForTwitch reaction =

0 commit comments

Comments
 (0)