diff --git a/modules/FactFile.py b/modules/FactFile.py index 7b6be2b..2a4dedc 100644 --- a/modules/FactFile.py +++ b/modules/FactFile.py @@ -44,7 +44,7 @@ class FactFile(Module): # http://www.regexprn.com/2008/11/read-random-line-in-large-file-in.html with open(filename, 'r') as file: facts = file.readlines() - to_print = facts[random.randint(0, len(facts))] + to_print = facts[random.randint(1, len(facts))-1] # return text if replypath is None: