#NEWLINE# @ internationalizeDocstring #NEWLINE# def random( self , irc , msg , args , channel ) : #NEWLINE# #INDENT# "[<channel>]\n\n        Displays a random factoid (along with its key) from the database.\n        <channel> is only necessary if the message isn't sent in the channel\n        itself.\n        " #NEWLINE# results = self . db . randomFactoid ( channel ) #NEWLINE# if ( not results ) : #NEWLINE# #INDENT# irc . error ( _ ( 'No factoids in the database.' ) ) #NEWLINE# return #NEWLINE# #UNINDENT# ( fact , key ) = results #NEWLINE# irc . reply ( format ( 'Random factoid: %q is %q' , key , fact ) )