Skip to content

Commit b003445

Browse files
committed
Fix bug with /msgall command; bump to 0.1.1
1 parent 4a628be commit b003445

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<groupId>clockvapor.telegram.markov-telegram-bot</groupId>
99
<artifactId>markov-telegram-bot</artifactId>
10-
<version>0.1.0</version>
10+
<version>0.1.1</version>
1111

1212
<properties>
1313
<kotlin.version>1.3.21</kotlin.version>

src/main/kotlin/clockvapor/telegram/markov/MarkovTelegramBot.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,11 +343,11 @@ class MarkovTelegramBot(private val token: String, private val dataPath: String)
343343
?.generateWithCaseInsensitiveSeed(seed)
344344

345345
private fun generateMessageTotal(chatId: String): String? =
346-
tryOrNull(reportException = false) { MarkovChain.read(getTotalMarkovPath(chatId)) }?.generate()
346+
tryOrNull(reportException = false) { getOrCreateTotalMarkovChain(chatId) }?.generate()
347347
?.takeIf { it.isNotEmpty() }?.joinToString(" ")
348348

349349
private fun generateMessageTotal(chatId: String, seed: String): MarkovChain.GenerateWithSeedResult? =
350-
tryOrNull(reportException = false) { MarkovChain.read(getTotalMarkovPath(chatId)) }
350+
tryOrNull(reportException = false) { getOrCreateTotalMarkovChain(chatId) }
351351
?.generateWithCaseInsensitiveSeed(seed)
352352

353353
private fun reply(bot: Bot, message: Message, text: String, parseMode: ParseMode? = null) {

0 commit comments

Comments
 (0)