o
    {g%                     @   s  d dl mZ d dlmZ d dlmZmZmZ d dlm	Z	m
Z
 ddlmZmZmZ ddlmZmZmZmZmZ d	ed
efddZejedd	efddZejedd	efddZejedd	efddZejedd	efddZejedd	efddZejedd	efddZejedd	efd d!Z ejed"d	efd#d$Z!d%S )&    )filters)	ParseMode)CallbackQueryInlineKeyboardButtonInlineKeyboardMarkup)command_templatehelp_template   )gen_bot_help_buttonsgen_inline_help_buttonsstart_button   )HELP_MSG	START_MSGConfigSymbolshellbotcbreturnc                    s,   | j jtjvr| jdddI d H  dS dS )Nz:You are not authorized to use this bot. 

</> @Its_HellBotT
show_alertF)	from_useridr   
AUTH_USERSanswer)r    r   X/var/www/bot.gig.net.ua/public_html/telegram/P1/HellBot/Hellbot/plugins/bot/callbacks.pycheck_auth_click   s   r   
auth_closec                    s(   t |I d H r|j I d H  d S d S N)r   messagedelete_r   r   r   r   auth_close_cb   s   r$   closec                    s   |j  I d H  d S r   )r    r!   r"   r   r   r   close_cb   s   r&   bot_help_menuc              	      s  t |I d H s
d S t|jdd zfddttj d D  W n ty:   |jdddI d H  Y d S w  fd	dt	d
t
 dD   ttjdg d dtj d  dt
ttj d  d}z|j|dt dI d H  W d S  ty   Y d S w )N:r   c                    s.   g | ]}t tj d | d  d| qS ) zbot_help_cmd:r(   r   r   bullet.0i)pluginr   r   
<listcomp>(   s     z$bot_help_menu_cb.<locals>.<listcomp>commands(No description provided for this plugin!Tr   c                       g | ]
} ||d   qS r	   r   r,   buttonsr   r   r0   0       r   r	   zhelp_data:bothelpu0   **𝖯𝗅𝗎𝗀𝗂𝗇 𝖥𝗂𝗅𝖾:** `u3   `
**𝖯𝗅𝗎𝗀𝗂𝗇 𝖨𝗇𝖿𝗈:** __infouN    🍀__

**📃 𝖫𝗈𝖺𝖽𝖾𝖽 𝖢𝗈𝗆𝗆𝖺𝗇𝖽𝗌:** ``disable_web_page_previewreply_markup)r   strdatasplitsortedr   BOT_HELPKeyErrorr   rangelenappendr   r   backedit_message_textr   	Exceptionr#   r   captionr   )r6   r/   r   bot_help_menu_cb    s:   

rK   bot_help_cmdc                    s   t |I d H s
d S d}t|jdd }t|jdd }tj| d | }|dtj d|d  d	7 }|d
tj d|d  d7 }|d7 }t	tj
d| t	tjdgg}z||tjdt|I d H  W d S  tyt   Y d S w )N r(   r   r	   r1   **u#    𝖢𝗈𝗆𝗆𝖺𝗇𝖽:** `/commandr9   

**3    𝖣𝖾𝗌𝖼𝗋𝗂𝗉𝗍𝗂𝗈𝗇:** __description__   

**<\> @Its_HellBot 🍀**zbot_help_menu:help_data:botcloseT)r   r=   r>   r?   r   rA   r   radio_selectarrow_rightr   rF   r%   rG   r   MARKDOWNr   rH   )r#   r   resultr/   rO   cmd_dictr6   r   r   r   bot_help_cmd_cbD   s4   
r[   	help_pagec                    s   t |I d H s
d S t|jdd }t|ttjI d H \}}t|j	j
ttjttjf|d |fI d H }z|j|t|dI d H  W d S  tyQ   Y d S w )Nr(   r   r<   )r   intr>   r?   r   r@   r   CMD_MENUr   r   mentionrD   CMD_INFOrG   r   rH   )r#   r   pager6   max_pagerJ   r   r   r   help_page_cbg   s$   

rd   	help_menuc                    s&  t |I d H s
d S t|jdd t|jdd zfddttj d D  W n tyE   |j	ddd	I d H  Y d S w  fd
dt
dt dD   ttjd g ttj d tttj d I d H }z|j|t dI d H  W d S  ty   Y d S w )Nr(   r   r	   c              
      s4   g | ]}t tj d | d  d d| qS )r)   z	help_cmd:r(   r*   r,   )rb   r/   r   r   r0      s    "z help_menu_cb.<locals>.<listcomp>r1   r2   Tr   c                    r3   r4   r   r,   r5   r   r   r0      r7   r   z
help_page:r8   r]   )r   r^   r>   r?   r=   r@   r   	HELP_DICTrB   r   rC   rD   rE   r   r   rF   r   rG   r   rH   rI   r   )r6   rb   r/   r   help_menu_cb   s8   

rg   help_cmdc              	      s  t |I d H s
d S t|jdd }t|jdd }t|jdd }d}tj| d | }|d d u rM|dtj d	tj	d
  |d  d7 }n|dtj d	tj	d
  |d  d|d  d7 }|d rw|dtj
 d|d  d7 }|d r|dtj
 dtj	d
  |d  d7 }|d r|dtj
 d|d  d7 }|d7 }ttjd| d| ttjdgg}z|j|tjt|dI d H  W d S  ty   Y d S w )Nr(   r   r	      rM   r1   
parametersrN   u"    𝖢𝗈𝗆𝗆𝖺𝗇𝖽:** `r   rO   r9   r)   rR   rP   rQ   rS   exampleu"    𝖤𝗑𝖺𝗆𝗉𝗅𝖾:** `noteu    𝖭𝗈𝗍𝖾:** __rT   z
help_menu:zhelp_data:cr]   )r   r^   r>   r?   r=   r   rf   r   rV   HANDLERSrW   r   rF   r%   rG   r   rX   r   rH   )r#   r   rb   r/   rO   rY   rZ   r6   r   r   r   help_cmd_cb   sB   (0&
rn   	help_datac                    s  t |I d H s
d S t|jdd }|dkr+|jdttddggdI d H  d S |dkr_td	tt	j
I d H \}}t|jjtt	jtt	j
fd|fI d H }|j|t|dI d H  d S |d
krm|j I d H  d S |dkrt I d H }|jtdt|dI d H  d S |dkrtdddtdddgtdddgtdddtdddgtddttjdgg}|jddt|dI d H  d S |dkrt }|jt|jjdt|dI d H  d S d S )Nr(   r   cu?   **𝖧𝖾𝗅𝗉 𝖬𝖾𝗇𝗎 𝖢𝗅𝗈𝗌𝖾𝖽!**Reopenzhelp_data:reopenr]   reopenr   botclosebothelpTr:   sourceu   🚀 Deployz&https://github.com/The-HellBot/HellBot)urlu   Plugins 📂z&https://github.com/The-HellBot/Pluginsu(   нєℓℓвσт ηєтωσяк 🇮🇳zhttps://t.me/HellBot_Networksu   🎙️ Supportzhttps://t.me/HellBot_Chatsu   Updates 📣zhttps://t.me/Its_HellBotu   🔙zhelp_data:startrU   u  __» The source code is available on GitHub. You can find the link below.__
__» Every project available under The-HellBot are open-source and free to use and modify to your needs.__
__» Anyone pretending to be the developer of this bot and selling the code, is a scammer.__

__» Please consider giving a star to the repository if you liked the project.__
__» Feel free to contact us if you need any help regarding the source code.__

**❤️ @HellBot_Networks 🇮🇳**start)r   r=   r>   r?   rG   r   r   r   r@   r   r_   r   r   r`   rD   ra   r    r!   r
   r   r   r%   r   r   format)r#   r   actionr6   pagesrJ   r   r   r   help_close_cb   sr   







r{   N)"pyrogramr   pyrogram.enumsr   pyrogram.typesr   r   r   Hellbot.functions.templatesr   r   btnsGr
   r   r   rM   r   r   r   r   r   boolr   boton_callback_queryregexr$   r&   rK   r[   rd   rg   rn   r{   r   r   r   r   <module>   s.    
#"%.