Handler promo data#
Handler promo#
Promo-control module.
- class handler_promo.HandlerEP(bot, admin_id)[source]#
Class for get premium if user has a promo code.
- Parameters:
bot (Bot) –
admin_id (int) –
- async __add_new_promo_admin_ctrl_step1(call, state)#
Add a new promo. | Control ADMIN. | Step 1.
- Parameters:
call (CallbackQuery) – Callback Query.
state (FSMContext) – FSM.
- Returns:
None.
- Return type:
None
- async __add_new_promo_admin_ctrl_step2(message, state)#
Add a new promo. | Control ADMIN. | Step 2.
- Parameters:
message (Message) – Message from the admin with PROMO-data.
state (FSMContext) – FSM.
- Returns:
None.
- Return type:
None
- async __add_new_promo_code_admin_ctrl(call)#
Add a new promo. | Control ADMIN. | Confirmation.
- Parameters:
call (CallbackQuery) – Callback Query.
- Returns:
None.
- Return type:
None
- async __delete_promo_data_admin_ctrl(call)#
Delete promo. | Control ADMIN. | Confirmation.
- Parameters:
call (CallbackQuery) – Callback Query.
- Returns:
None.
- Return type:
None
- async __delete_promo_data_admin_ctrl_step1(call, state)#
Delete promo. | Control ADMIN. | Step 1.
- Parameters:
call (CallbackQuery) – Callback Query.
state (FSMContext) – FSM.
- Returns:
None.
- Return type:
None
- async __delete_promo_data_admin_ctrl_step2(message, state)#
Delete promo. | Control ADMIN. | Step 2.
- Parameters:
message (Message) – Message from the admin with PROMO-data.
state (FSMContext) – FSM.
- Returns:
None.
- Return type:
None
- async __entering_promo_step1(message, state)#
Get promo code (text format).
- Parameters:
message (Message) – A promo code.
state (FSMContext) – FSM.
- Returns:
None.
- Return type:
None
- async __entering_promo_step2(call)#
Confirmation of apply a promo code.
- Parameters:
call (CallbackQuery) – Callback Query.
- Returns:
None.
- Return type:
None
- async __show_promo_datas_admin_ctrl(call)#
Show PROMO datas. | Control ADMIN.
- Parameters:
call (CallbackQuery) – Callback Query.
- Returns:
None.
- Return type:
None
- async enter_promo(call, state)[source]#
Function for get a promo code from user.
- Parameters:
call (CallbackQuery) – Callback Query.
state (FSMContext) – FSM.
- Returns:
None.
- Return type:
None
Show PROMO Menu. | Control ADMIN.
- Parameters:
call_query (CallbackQuery) – Callback Query.
- Returns:
None.
- Return type:
None