We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae6d44d commit 8b23f94Copy full SHA for 8b23f94
1 file changed
plugins/factoids.py
@@ -186,10 +186,7 @@ def listfactoids(notice, chan):
186
@hook.command("listdetailedfacts", autohelp=False)
187
def listdetailedfactoids(chan):
188
"""- lists all available factoids with their respective data"""
189
- formatted_facts = []
190
- for fact in sorted(factoid_cache[chan].items()):
191
- fact = fact[0] + ": " + fact[1]
192
- formatted_facts.append(fact)
193
-
194
- data = '\n'.join(formatted_facts).encode('UTF-8')
195
- return web.paste(data, service="hastebin")
+ headers = ("Command", "Output")
+ data = [(fact[0], fact[1]) for fact in factoid_cache[chan].items()]
+ table = gen_markdown_table(headers, data).encode('UTF-8')
+ return web.paste(table, "md", "hastebin")
0 commit comments