
    ni                         d dl mZ d dlmZ d dlmZ dedej                  ddfdZdedej                  ddfd	Zde	dej                  ddfd
Z
y)    )Update)ContextTypes)loggerupdatecontextreturnNc                 :  K   | j                   }| j                  }t        j                  d|r|j                  nd|r|j                  nd|r|j
                  nd       | j                  j                  d|r|j                         nd dd       d {    y 7 w)Nz7Received /start from user_id=%s in chat_id=%s (type=%s)unknownzHello, therezc! I'm your dota assistant bot.
In groups, mention me with @botname or reply to my messages to chat.HTML)
parse_mode)	effective_usereffective_chatr   infoidtypemessage
reply_textmention_html)r   r   userchats       /app/bot/handlers/common.pystartr      s       D  D
KKAYY		y	 ..
#
#
$##%7; <O 	O $   s   BBBBc                 Z   K   d}| j                   j                  |       d {    y 7 w)Na  Available commands:
/start - Introduction
/help  - This message

Dota 2 tracking:
/addplayer <steam_id> [name] - Track a player
/removeplayer <steam_id>     - Stop tracking a player
/listplayers                 - Show tracked players

Party gathering (groups only):
/party [minutes]  - Invite group members to a Dota 2 party
/accept           - Join the active party
/decline          - Pass on the active party
/abandon          - Cancel the active gather (host only)

In groups, mention me or reply to my messages.)r   r   )r   r   texts      r   help_commandr      s*     	9 	 ..
#
#D
)))s   !+)+c                 d   K   t        j                  d|j                  |j                         y w)Nz&Exception while handling an update: %s)exc_info)r   error)r   r   s     r   error_handlerr    *   s#     
LL0s   .0)telegramr   telegram.extr   bot.core.loggerr   DEFAULT_TYPEr   r   objectr         r   <module>r(      sn     % " )B)B t  *v *0I0I *d *& 1J1J t r'   