set max conversation messages

This commit is contained in:
2026-03-10 12:54:36 -04:00
parent d063519c04
commit 7f5909690d

View File

@@ -304,6 +304,8 @@ async def talkforme(ctx, *, message: str):
Usage: !talkforme bot1 bot2 4 some conversation topic
"""
TALK_LIMIT = 20
bot1_name, bot2_name, limit, topic_list = (
message.split(" ")[0],
message.split(" ")[1],
@@ -370,7 +372,7 @@ async def talkforme(ctx, *, message: str):
current_user = flip_user(current_user)
bot_counter = flip_counter(counter=bot_counter)
while message_counter < message_limit:
while message_counter < min(message_limit, TALK_LIMIT):
current_bot = bot_list[bot_counter]
logger.info(f"Current user is {current_user}")
logger.info(f"Current bot is {current_bot}")