Skip to content

Commit b9a99eb

Browse files
committed
Reduce !asciify cooldown to 1 minute
1 parent 74fccf3 commit b9a99eb

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Bot/Asciify.hs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,13 @@ currentAsciifyState = do
4444
Just state -> return state
4545
Nothing -> createEntity Proxy =<< AsciifyState <$> now
4646

47-
asciifyCooldown :: Reaction Message a -> Reaction Message a
48-
asciifyCooldown next =
47+
asciifyCooldown :: NominalDiffTime -> Reaction Message a -> Reaction Message a
48+
asciifyCooldown cooldown next =
4949
Reaction $ \msg -> do
5050
state <- currentAsciifyState
5151
currentTime <- now
5252
let diff =
5353
diffUTCTime currentTime $ asciifyStateLastUsed $ entityPayload state
54-
let cooldown = 2 * 60
5554
if diff > cooldown
5655
then do
5756
void $ updateEntityById $ AsciifyState currentTime <$ state
@@ -69,7 +68,7 @@ asciifyReaction =
6968
bttv <- bttvUrlByName name
7069
return (ffz <|> bttv)) $
7170
replyOnNothing "Such emote does not exist" $
72-
asciifyCooldown $
71+
asciifyCooldown 60 $
7372
byteStringHttpRequestReaction $
7473
cmapR (braillizeByteString . BSL.toStrict) $
7574
eitherReaction (Reaction (logMsg . T.pack . messageContent)) $

0 commit comments

Comments
 (0)