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