OptionalmaxOptionalfileOptional JSON file for persistence across restarts.
OptionalautoAuto-save interval: a duration ('1m') or ms. Set 0 to disable. Default 60_000.
OptionalloggerOptional logger for load/persist failures. Falls back to silence when omitted.
Max messages retained per chat; older ones are dropped on save. Default 1000 — unlike the persistent stores, where the cap is opt-in, because this log lives in the process's RAM and is never persisted: an unbounded default would grow memory forever on a long-running bot. Pass
Infinityto disable it. Must be a non-negative integer orInfinity, else the constructor throws aRangeError.