Business handler for answers#

Module of the business answers#

Module of the answers.

class business_answers.Answers(business_connection_id, admin_id)[source]#

Answers-Class.

async answer_to_user(bot, message)[source]#

Answer to a user from admin-account (as admin).

Parameters:
  • bot (Bot) – The Bot Object.

  • message (Message) – Message of a user.

Returns:

None.

Return type:

None

class business_answers.BaseFunctionBusinessAnswerSector(bot, chat_id, action, b_c_id, text_pattern, sticker_pattern, admin_id)[source]#

The basic class-sector of function business answer (by some patterns).

Parameters:
  • bot (Bot) –

  • chat_id (int | str) –

  • action (str) –

  • b_c_id (str) –

  • text_pattern (dict) –

  • sticker_pattern (str) –

  • admin_id (int) –

abstract async pattern()[source]#

Pattern-function for business answers.

Returns:

None.

Return type:

None

class business_answers.ChatAction[source]#

The class for set some action for message.

async static chat_action(bot, chat_id, action, business_connection_id)[source]#

Send chat action.

Parameters:
  • bot (Bot) – The Bot Object.

  • chat_id (int | str) – Chat ID.

  • action (str) – Action.

  • business_connection_id (str) – Business connection ID.

Returns:

None.

Return type:

None

class business_answers.FunctionBusinessAnswerBotDoesntWorkSector(bot, chat_id, action, b_c_id, text_pattern, sticker_pattern, admin_id)[source]#

The class-sector of function business answer (by pattern “bot doesn’t work”).

Parameters:
  • bot (Bot) –

  • chat_id (int | str) –

  • action (str) –

  • b_c_id (str) –

  • text_pattern (dict) –

  • sticker_pattern (str) –

  • admin_id (int) –

async pattern()[source]#

Pattern-function for business answers by phrases-type: “bot doesn’t work”.

Returns:

None.

Return type:

None

class business_answers.FunctionBusinessAnswerCongratulationSector(bot, chat_id, action, b_c_id, text_pattern, sticker_pattern, admin_id)[source]#

The class-sector of function business answer (by pattern “congratulation”).

Parameters:
  • bot (Bot) –

  • chat_id (int | str) –

  • action (str) –

  • b_c_id (str) –

  • text_pattern (dict) –

  • sticker_pattern (str) –

  • admin_id (int) –

async pattern()[source]#

Pattern-function for business answers by phrases-type: “congratulation”.

Returns:

None.

Return type:

None

class business_answers.FunctionBusinessAnswerThanksSector(bot, chat_id, action, b_c_id, text_pattern, sticker_pattern, admin_id)[source]#

The class-sector of function business answer (by pattern “thanks”).

Parameters:
  • bot (Bot) –

  • chat_id (int | str) –

  • action (str) –

  • b_c_id (str) –

  • text_pattern (dict) –

  • sticker_pattern (str) –

  • admin_id (int) –

async pattern()[source]#

Pattern-function for business answers by phrases-type: “thanks”.

Returns:

None.

Return type:

None