Module ImportFrom alias identifier ImportFrom alias ImportFrom alias Import alias Import alias Import alias Import alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore Dict Str Str Str Str NameLoad NameLoad NameLoad NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If UnaryOpNot SubscriptLoad NameLoad Index Str body Raise Call NameLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr keyword SubscriptLoad SubscriptLoad NameLoad Index Str Index Str keyword Call AttributeLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str attr Str keyword IfExp CompareIn Str SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Call AttributeLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str attr Str Str Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr keyword SubscriptLoad SubscriptLoad NameLoad Index Str Index Str keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Return decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListComp NameLoad comprehension NameStore AttributeLoad NameLoad attr CompareIn NameLoad AttributeLoad NameLoad attr If CompareGt Call NameLoad NameLoad Num body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr keyword Call AttributeLoad Str attr NameLoad Return SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Str Str Str Str SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str IfExp CompareIn Str SubscriptLoad AttributeLoad NameLoad attr Index Str SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str NameLoad IfExp CompareIn Str SubscriptLoad AttributeLoad NameLoad attr Index Str Call AttributeLoad Str attr keyword SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str If Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad SubscriptLoad Call AttributeLoad NameLoad attr Str Num Index Num attr If Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str Str Num attr Assign NameStore Call AttributeLoad SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num attr Return ListComp NameLoad comprehension NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str BoolOpOr CompareIn Call AttributeLoad SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num attr SubscriptLoad NameLoad Index Str CompareIn Str SubscriptLoad NameLoad Index Str Return SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str If UnaryOpNot Call AttributeLoad NameLoad attr Str Str body Return NameLoad If BoolOpAnd CompareNotIn NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr Str Str attr Str CompareNotIn NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr Str Str attr Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr keyword SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str keyword NameLoad Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str Return Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore ListComp Call AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str Str Str attr Str For NameStore AttributeLoad NameLoad attr body If BoolOpAnd UnaryOpNot CompareIn SubscriptLoad NameLoad Index Str NameLoad UnaryOpNot NameLoad body Continue TryExcept body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad AttributeLoad NameLoad attr Index Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr keyword SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr keyword SubscriptLoad NameLoad Index Str Continue Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr keyword SubscriptLoad NameLoad Index Str keyword Call NameLoad NameLoad keyword Call AttributeLoad NameLoad attr Continue If Call AttributeLoad NameLoad attr body Assign NameStore Str If Call NameLoad NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore NameLoad Return decorator_list decorator_list
N/A hogar.static values static_values hogar.Utils PluginLoader hogar.Utils Telegram N/A ConfigParser N/A traceback N/A os N/A logging N/A logger N/A N/A logging getLogger __name__ N/A config N/A N/A ConfigParser ConfigParser Response N/A object N/A N/A 
        The Hogar Response handler.

        This class mediates the connection between actual
        messages received by the API and the plugins
        that are available for them.
     N/A response None N/A command_map None N/A message_type None N/A plugins None N/A sender_information N/A id first_name last_name username None None None None __init__ N/A N/A self response command_map N/A N/A N/A 
            Prepare a new Response() instance.

            This __init__ will do a lot of the heavy lifting
            when it comes to determining the message_type,
            and which plugins are available for it.

            --
            @param  response:dict       The parsed Telegram response.
            @param  command_map:dict    The command/type/plugin map.

            @return None
         N/A N/A N/A response N/A message N/A N/A N/A ValueError No message payload in the response? WTF? N/A N/A N/A logger info N/A N/A Processing message {message_id} from {first_name} {last_name}  format message_id N/A N/A response N/A message N/A message_id first_name N/A N/A N/A N/A N/A response N/A message N/A from N/A first_name encode utf-8 last_name N/A N/A last_name N/A N/A response N/A message N/A from N/A N/A N/A N/A N/A response N/A message N/A from N/A last_name encode utf-8 N/A N/A self response N/A response N/A message N/A N/A self command_map command_map N/A N/A self message_type N/A N/A self _get_message_type N/A N/A N/A logger info N/A N/A Message {message_id} is a {type} message format message_id N/A N/A response N/A message N/A message_id type N/A self message_type N/A N/A self sender_information N/A N/A self _get_sender_information N/A N/A self plugins N/A N/A self _find_applicable_plugins N/A N/A _get_message_type N/A N/A self N/A N/A N/A 
            Get the message type.

            --
            @return str
         N/A type_search N/A message_type N/A message_type N/A static_values possible_message_types N/A message_type N/A self response N/A N/A N/A len type_search 1 N/A N/A N/A N/A logger warning N/A N/A More than 1 message type found: ({res}). Selecting only the first entry format res N/A N/A ,  join type_search N/A N/A type_search N/A 0 N/A _get_sender_information N/A N/A self N/A N/A N/A 
            Get information about who sent a message.

            --
            @return dict
         N/A sender_information N/A id first_name last_name username N/A N/A N/A self response N/A chat N/A id N/A N/A N/A self response N/A from N/A first_name N/A N/A last_name N/A N/A self response N/A from N/A N/A N/A self response N/A from N/A last_name None N/A N/A username N/A N/A self response N/A from N/A N/A @{u} format u N/A N/A N/A self response N/A from N/A username None N/A sender_information N/A _find_applicable_plugins N/A N/A self N/A N/A N/A 
            Find Applicable plugins based on message type.

            --
            @return dict
         N/A N/A N/A self message_type text N/A N/A text N/A N/A self response N/A text N/A N/A N/A text startswith @ N/A N/A text N/A N/A N/A N/A N/A text split 1 N/A 1 strip N/A N/A N/A text startswith / N/A N/A text N/A N/A N/A N/A text replace / 1 strip N/A text N/A N/A N/A N/A N/A text split @ N/A 0 strip N/A N/A x N/A x N/A N/A self command_map N/A text N/A N/A N/A N/A N/A N/A N/A text split N/A 0 lower N/A x N/A commands N/A * N/A x N/A commands N/A N/A N/A self command_map N/A N/A self message_type N/A check_acl N/A N/A self N/A N/A N/A 
            Check Access Control List

            Check if the ACL features are enbaled for this bot.
            If it is, ensure that the message was received
            from someone that is either the bot owner or
            a user.

            --
            @return bool
         N/A N/A N/A config read N/A N/A N/A os path join N/A N/A N/A os path dirname __file__ ../settings.ini N/A message_from_id N/A str N/A N/A N/A self response N/A from N/A id N/A N/A N/A N/A config getboolean acl enabled N/A N/A True N/A N/A N/A message_from_id N/A N/A N/A N/A config get acl owners split , N/A message_from_id N/A N/A N/A N/A config get acl users split , N/A N/A N/A N/A logger error N/A N/A {first_name} ({id}) is not allowed to use this bot format first_name N/A N/A N/A self response N/A from N/A first_name id message_from_id N/A False N/A True N/A run_plugins N/A N/A self N/A N/A N/A 
            Run Plugins

            This is the main function responsible for executing
            the plugins that have been identified for this
            message.

            --
            @return None
         N/A N/A N/A self plugins N/A N/A N/A N/A logger warning No plugins matched for this message. N/A N/A can_send N/A N/A self check_acl N/A N/A N/A config read N/A N/A N/A os path join N/A N/A N/A os path dirname __file__ ../settings.ini N/A acl_free_plugins N/A N/A N/A x strip N/A x N/A N/A N/A N/A config get advanced no_acl_plugins split , N/A plugin N/A self plugins N/A N/A N/A N/A N/A N/A plugin N/A name acl_free_plugins N/A can_send N/A N/A N/A N/A N/A N/A N/A logger info N/A N/A Running plugin: {plugin} for message {message_id} format plugin N/A plugin N/A name message_id N/A N/A self response N/A message_id N/A N/A N/A logger debug N/A N/A Loading plugin: {plugin} format plugin N/A plugin N/A name N/A plugin_on_disk N/A N/A PluginLoader find_plugin N/A plugin N/A name N/A loaded_plugin N/A N/A PluginLoader load_plugin plugin_on_disk N/A N/A loaded_plugin N/A N/A N/A N/A logger critical N/A N/A Loading plugin {name} returned nothing. format name N/A plugin N/A name N/A N/A plugin_output N/A N/A loaded_plugin run N/A self response N/A N/A N/A Exception N/A e N/A N/A N/A N/A logger error N/A N/A Plugin {plugin} failed with: {error}: {trace} format plugin N/A plugin N/A name error N/A str e trace N/A N/A traceback print_exc N/A N/A N/A N/A loaded_plugin should_reply N/A N/A reply_type text N/A N/A hasattr loaded_plugin reply_type N/A N/A reply_type N/A N/A loaded_plugin reply_type N/A N/A N/A Telegram send_message N/A self sender_information reply_type plugin_output N/A loaded_plugin None N/A N/A N/A