You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/karma.py
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ def db_init(db, conn_name):
22
22
23
23
@hook.command("pp", "addpoint")
24
24
defaddpoint(text, nick, chan, db, conn):
25
-
""".addpoint or (.pp) <thing> adds a point to the <thing>"""
25
+
"""<thing> - adds a point to the <thing>"""
26
26
text=text.strip()
27
27
db_init(db, conn.name)
28
28
karma=db.execute("select score from karma where name = :name and chan = :chan and thing = :thing", {'name': nick, 'chan': chan, 'thing': text.lower()}).fetchone()
""".rmpoint or (.mm) <thing> subtracts a point from the <thing>"""
54
+
"""<thing> - subtracts a point from the <thing>"""
55
55
text=text.strip()
56
56
db_init(db, conn.name)
57
57
karma=db.execute("select score from karma where name = :name and chan = :chan and thing = :thing", {'name': nick, 'chan': chan, 'thing': text.lower()}).fetchone()
"""prints the things you have liked and their scores"""
72
+
"""- prints the things you have liked and their scores"""
73
73
db_init(db, conn.name)
74
74
output=""
75
75
likes=db.execute("select thing, score from karma where name = :name and chan = :chan and score >= 0 order by score desc", {'name': nick, 'chan': chan}).fetchall()
"""prints the things you have disliked and their scores"""
83
+
"""- prints the things you have disliked and their scores"""
84
84
db_init(db, conn.name)
85
85
output=""
86
86
likes=db.execute("select thing, score from karma where name = :name and chan = :chan and score <= 0 order by score", {'name': nick, 'chan': chan}).fetchall()
""".topten or .pointstop or .loved prints the top 10 things with the highest points in the channel. To see the top 10 items in all of the channels the bot sits in use .topten global."""
134
+
"""- prints the top 10 things with the highest points in the channel. To see the top 10 items in all of the channels the bot sits in use .topten global."""
""".bottomten or .pointsbottom or .hated prints the top 10 things with the lowest points in the channel. To see the bottom 10 items in all of the channels the bot sits in use .bottomten global."""
165
+
"""- prints the top 10 things with the lowest points in the channel. To see the bottom 10 items in all of the channels the bot sits in use .bottomten global."""
0 commit comments