mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-23 10:34:19 +01:00
added numlarts, numinsults, and numexcuses
This commit is contained in:
parent
ebdd969c7c
commit
b5d47aa811
@ -287,7 +287,33 @@ class FunDB(callbacks.Privmsg):
|
|||||||
else:
|
else:
|
||||||
irc.reply(msg, 'That word has no anagrams that I know of.')
|
irc.reply(msg, 'That word has no anagrams that I know of.')
|
||||||
|
|
||||||
|
def numlarts(self, irc, msg, args):
|
||||||
|
"""<takes no arguments>
|
||||||
|
|
||||||
|
Returns the number of 'larts' currently in the database"""
|
||||||
|
cursor = self.db.cursor()
|
||||||
|
cursor.execute('SELECT count(*) FROM larts')
|
||||||
|
total = cursor.fetchone()[0]
|
||||||
|
irc.reply(msg, 'There are currently %s larts in my database' % total)
|
||||||
|
|
||||||
|
def numinsults(self, irc, msg, args):
|
||||||
|
"""<takes no arguments>
|
||||||
|
|
||||||
|
Returns the number of insults currently in the database"""
|
||||||
|
cursor = self.db.cursor()
|
||||||
|
cursor.execute('SELECT count(*) FROM insults')
|
||||||
|
total = cursor.fetchone()[0]
|
||||||
|
irc.reply(msg, 'There are currently %s insults in my database' % total)
|
||||||
|
|
||||||
|
def numexcuses(self, irc, msg, args):
|
||||||
|
"""<takes no arguments
|
||||||
|
|
||||||
|
Returns the number of excuses currently in the database"""
|
||||||
|
cursor = self.db.cursor()
|
||||||
|
cursor.execute('SELECT count(*) FROM excuses')
|
||||||
|
total = cursor.fetchone()[0]
|
||||||
|
irc.reply(msg, 'There are currently %s excuses in my database' % total)
|
||||||
|
|
||||||
Class = FunDB
|
Class = FunDB
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user