diff --git a/SlackBot.py b/SlackBot.py index a7bb1db..2670af1 100644 --- a/SlackBot.py +++ b/SlackBot.py @@ -19,6 +19,15 @@ # there are no comments here def append_history(t): + """ + Append a session entry to the global history, keeping history length at most 20. + + Parameters: + t (dict): A history entry (e.g., session data with keys like 'user' and 'time') to append. + + Returns: + bool: Always returns True after appending. + """ if len(history) > 20: del history[:1] history.append(t)