Skip to content

Commit acd8211

Browse files
committed
Update BotServiceImpl.kt
1 parent 28a3abb commit acd8211

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

appCommon/src/main/kotlin/com/github/hummel/union/service/impl/BotServiceImpl.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class BotServiceImpl : BotService {
8787
if (Random.nextInt(5) == 0) {
8888
val channelId = event.channel.id
8989

90-
val prompt = chatHistory.getOrDefault(channelId, null)?.take(30)?.joinToString(
90+
val prompt = chatHistory.getOrDefault(channelId, null)?.takeLast(30)?.joinToString(
9191
prefix = firstChatPrompt,
9292
separator = "\r\n"
9393
)

0 commit comments

Comments
 (0)