2021-04-09 11:17:38 +03:00
|
|
|
from library.telegram.base import RequestContext
|
|
|
|
from nexus.bot.configs import config
|
|
|
|
from nexus.translations import t
|
|
|
|
from telethon import events
|
|
|
|
|
|
|
|
from .base import BaseHandler
|
|
|
|
|
|
|
|
|
2022-09-02 18:44:56 +03:00
|
|
|
class HowToHelpHandler(BaseHandler):
|
|
|
|
filter = events.NewMessage(incoming=True, pattern='^/howtohelp(@[A-Za-z0-9_]+)?$')
|
2021-04-09 11:17:38 +03:00
|
|
|
is_group_handler = True
|
|
|
|
|
|
|
|
async def handler(self, event: events.ChatAction, request_context: RequestContext):
|
2022-09-02 18:44:56 +03:00
|
|
|
request_context.statbox(action='show', mode='howtohelp')
|
2021-04-09 11:17:38 +03:00
|
|
|
await event.reply(
|
2022-09-02 18:44:56 +03:00
|
|
|
t('HOW_TO_HELP', request_context.chat.language).format(
|
2021-04-09 11:17:38 +03:00
|
|
|
amazon_gift_card_recipient=config['application'].get('amazon_gift_card_recipient', '🚫'),
|
|
|
|
amazon_gift_card_url=config['application'].get('amazon_gift_card_url', '🚫'),
|
|
|
|
btc_donate_address=config['application'].get('btc_donate_address', '🚫'),
|
2022-09-02 18:44:56 +03:00
|
|
|
eth_donate_address=config['application'].get('eth_donate_address', '🚫'),
|
2021-04-09 11:17:38 +03:00
|
|
|
related_channel=config['telegram'].get('related_channel', '🚫'),
|
2022-09-02 18:44:56 +03:00
|
|
|
sol_donate_address=config['application'].get('sol_donate_address', '🚫'),
|
|
|
|
xmr_donate_address=config['application'].get('xmr_donate_address', '🚫'),
|
|
|
|
xrp_donate_address=config['application'].get('xrp_donate_address', '🚫'),
|
|
|
|
xrp_donate_tag=config['application'].get('xrp_donate_tag', '🚫'),
|
2021-04-09 11:17:38 +03:00
|
|
|
))
|