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