🏡 index : ~doyle/dave.git

author dave <dave@ip-172-26-11-212.eu-west-2.compute.internal> 2019-03-30 14:57:40.0 +00:00:00
committer dave <dave@ip-172-26-11-212.eu-west-2.compute.internal> 2019-03-30 14:57:40.0 +00:00:00
commit
19d28d61623f226c486b88fcd1356daa163da8d9 [patch]
tree
84ba4f7a597c8f2f78d5abca4e22c9f08fe17328
parent
5ccc341a97f204f07ab8687cc76b2397d2ef2207
download
19d28d61623f226c486b88fcd1356daa163da8d9.tar.gz

dont attribute quotes to people who didnt say them



Diff

 dave/modules/quote.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dave/modules/quote.py b/dave/modules/quote.py
index ccff063..71f353a 100644
--- a/dave/modules/quote.py
+++ a/dave/modules/quote.py
@@ -36,8 +36,10 @@
        random.randrange(query.count())
    ).first()

    attr = " by " + row.attributed if row.attributed else ""

    bot.reply(source, sender, assembleFormattedText(A.normal[
        A.bold[row.quote], " by ", (row.attributed or row.added_by)
        A.bold[row.quote], attr
    ]))

@dave.module.help("Syntax: fq [search]. Search for a quote.")