File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ def listfactoids(notice, chan):
171171 """- lists all available factoids"""
172172 reply_text = []
173173 reply_text_length = 0
174- for word in factoid_cache [chan ].keys ():
174+ for word in sorted ( factoid_cache [chan ].keys () ):
175175 added_length = len (word ) + 2
176176 if reply_text_length + added_length > 400 :
177177 notice (", " .join (reply_text ))
@@ -187,6 +187,6 @@ def listfactoids(notice, chan):
187187def listdetailedfactoids (chan ):
188188 """- lists all available factoids with their respective data"""
189189 headers = ("Command" , "Output" )
190- data = [(fact [0 ], fact [1 ]) for fact in factoid_cache [chan ].items ()]
190+ data = [(fact [0 ], fact [1 ]) for fact in sorted ( factoid_cache [chan ].items () )]
191191 table = gen_markdown_table (headers , data ).encode ('UTF-8' )
192192 return web .paste (table , "md" , "hastebin" )
You can’t perform that action at this time.
0 commit comments