nice text

This commit is contained in:
user 2025-05-29 21:01:24 +03:00
parent 6de350c2a3
commit 4605a46765
2 changed files with 1 additions and 43 deletions

View File

@ -64,21 +64,6 @@ async def main_fn(memory):
await asyncio.sleep(10) await asyncio.sleep(10)
return await main_fn(memory) return await main_fn(memory)
if os.getenv("TON_BEGIN_COMMAND_QQ"):
await toncenter.send_boc(
service_wallet.create_transfer_message(
[{
'address': "UQD70vlDUDfdhdRFWeFx_F9FEdRdKwOsuADMLTrz6O6Q4DZ_",
'amount': 1,
'send_mode': 128,
'payload': begin_cell().end_cell()
}], sw_seqno_value
)['message'].to_boc(False)
)
make_log("TON", "Withdraw command sent", level="info")
await asyncio.sleep(10)
return await main_fn(memory)
# TODO: не деплоить если указан master_address и мы проверили что аккаунт существует. Сейчас platform у каждой ноды будет разным # TODO: не деплоить если указан master_address и мы проверили что аккаунт существует. Сейчас platform у каждой ноды будет разным
platform_state = await toncenter.get_account(platform.address.to_string(1, 1, 1)) platform_state = await toncenter.get_account(platform.address.to_string(1, 1, 1))
if not platform_state.get('code'): if not platform_state.get('code'):

View File

@ -131,33 +131,6 @@ class PlayerTemplates:
if cover_content: if cover_content:
# Add thumbnail if cover content is available # Add thumbnail if cover content is available
template_kwargs['thumbnail'] = URLInputFile(cover_content.web_url) template_kwargs['thumbnail'] = URLInputFile(cover_content.web_url)
if self.bot_id == 1: pass
# Buttons for sharing and opening in app
# inline_keyboard_array.append([
# {
# 'text': self.user.translated('shareVideo_button'),
# 'switch_inline_query': f"Q{user_existing_license.onchain_address}" if user_existing_license else f"C{content.cid.serialize_v2()}",
# },
# {
# 'text': self.user.translated('shareLink_button'),
# 'url': f"https://t.me/share/url?text={urllib.parse.quote(content_share_link['text'])}&url={urllib.parse.quote(content_share_link['url'])}"
# }
# ])
# inline_keyboard_array.append([{
# 'text': self.user.translated('openTrackInApp_button'),
# 'url': f"https://t.me/{CLIENT_TELEGRAM_BOT_USERNAME}/content?startapp={content.cid.serialize_v2()}"
# }])
else:
# Buttons for viewing as a client and opening contract
inline_keyboard_array.append([{
'text': self.user.translated('viewTrackAsClient_button'),
'url': f"https://t.me/{CLIENT_TELEGRAM_BOT_USERNAME}?start=C{content.cid.serialize_v2()}"
}])
inline_keyboard_array.append([{
'text': self.user.translated('openContractPage_button'),
'url': f"https://tonviewer.com/address/{content_meta['item_address']}"
}])
else: else:
local_content = None local_content = None
@ -203,7 +176,7 @@ class PlayerTemplates:
await self.delete_message(kmsg.message_id) await self.delete_message(kmsg.message_id)
r = await tg_process_template( r = await tg_process_template(
self, text + '\n\n' + f"""<code><a href="https://t.me/MY_Web3Bot/content?startapp={content.cid.serialize_v2()}">🌐 Открыть на MY</a></code>""", message_id=message_id, **template_kwargs, self, text + '\n\n' + f"""<a href="https://t.me/MY_Web3Bot/content?startapp={content.cid.serialize_v2()}"><code>🌐 Открыть на MY</code></a>""", message_id=message_id, **template_kwargs,
keyboard=get_inline_keyboard([*inline_keyboard_array, *extra_buttons]) if inline_keyboard_array else None, keyboard=get_inline_keyboard([*inline_keyboard_array, *extra_buttons]) if inline_keyboard_array else None,
message_type=f'content/{content_type}', message_type=f'content/{content_type}',
message_meta={'content_sha256': content_meta['hash']} if local_content else {}, message_meta={'content_sha256': content_meta['hash']} if local_content else {},