@hook.command('loved')
def loved(db):
 query = db.execute(select([karma_table]).order_by(karma_table.c.total_karma.desc()).limit(5)).fetchall()
 if (not query):
  return '??'
 else:
  return query

@ hook . command ( 'loved' ) def loved ( db ) : query = db . execute ( select ( [ karma_table ] ) . order_by ( karma_table . c . total_karma . desc ( ) ) . limit ( 5 ) ) . fetchall ( ) if ( not query ) : return '??' else : return query
loved -- shows the users with the most karma! .