Skip to content

Commit

Permalink
Remove newlines in haiku input
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwofford committed Mar 2, 2022
1 parent c2e6eba commit e22a95d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/interactions/haiku.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { format } from "haiku-detect"

const interactionHaiku = (bot, message) => {
const { text, user } = message
const haikuLines = format(text)
const noLineText = text.replace(/\n/g, ' ')
const haikuLines = format(noLineText)
if (haikuLines.length == 3) {
bot.replyInThread(message, transcript('haiku', { haikuLines, user }))
}
Expand Down

0 comments on commit e22a95d

Please sign in to comment.