<s> '''<STR_LIT>''' <EOL> import pyjokes <EOL> from hogar . Utils . StringUtils import ignore_case_replace <EOL> def enabled ( ) : <EOL> '''<STR_LIT>''' <EOL> return True <EOL> def applicable_types ( ) : <EOL> '''<STR_LIT>''' <EOL> return [ '<STR_LIT:text>' ] <EOL> def commands ( ) : <EOL> '''<STR_LIT>''' <EOL> return [ '<STR_LIT>' ] <EOL> def should_reply ( ) : <EOL> '''<STR_LIT>''' <EOL> return True <EOL> def reply_type ( ) : <EOL> '''<STR_LIT>''' <EOL> return '<STR_LIT:text>' <EOL> def _show_help ( ) : <EOL> '''<STR_LIT>''' <EOL> h = '<STR_LIT>' <EOL> h += '<STR_LIT>' <EOL> h += '<STR_LIT>' <EOL> h += '<STR_LIT>' <EOL> h += '<STR_LIT>' <EOL> h += '<STR_LIT>' <EOL> h += '<STR_LIT>' <EOL> return h <EOL> def run ( message ) : <EOL> '''<STR_LIT>''' <EOL> text = message [ '<STR_LIT:text>' ] <EOL> if text . startswith ( '<STR_LIT:@>' ) : <EOL> text = text . split ( '<STR_LIT:U+0020>' , <NUM_LIT:1> ) [ <NUM_LIT:1> ] . strip ( ) <EOL> if text . startswith ( '<STR_LIT:/>' ) : <EOL> text = text . replace ( '<STR_LIT:/>' , '<STR_LIT>' , <NUM_LIT:1> ) . strip ( ) <EOL> action = text . split ( '<STR_LIT:U+0020>' ) [ <NUM_LIT:0> ] . strip ( ) <EOL> if action not in commands ( ) : <EOL> return '<STR_LIT>' . format ( <EOL> command = action ) <EOL> for command in commands ( ) : <EOL> text = ignore_case_replace ( command , '<STR_LIT>' , text ) . strip ( ) <EOL> if text == '<STR_LIT>' : <EOL> return _show_help ( ) <EOL> if text in [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT:all>' ] : <EOL> return pyjokes . get_joke ( language = '<STR_LIT>' , category = text ) <EOL> return pyjokes . get_joke ( language = '<STR_LIT>' , category = '<STR_LIT:all>' ) </s>
