buttons etc
This commit is contained in:
1 parent
18cf8f9954
commit
d9cd30ae33
4 files changed
+11
-3
No files matched your search
@@ -126,6 +126,8 @@ async def t_inline_query_node_content(query: types.InlineQuery, memory=None, use
|
||||
if cover_content:
|
||||
result_kwargs['thumb_url'] = cover_content.web_url
|
||||
|
||||
content_type_declared = decrypted_content_meta.get('content_type', 'application/x-binary').split('/')[0]
|
||||
|
||||
content_list.append(
|
||||
types.InlineQueryResultAudio(
|
||||
id=f"NC_{content.id}",
|
||||
@@ -137,7 +139,10 @@ async def t_inline_query_node_content(query: types.InlineQuery, memory=None, use
|
||||
parse_mode='html',
|
||||
reply_markup=get_inline_keyboard([
|
||||
[{
|
||||
'text': user.translated('shareTrack_button'),
|
||||
'text': {
|
||||
'audio': user.translated('shareTrack_button'),
|
||||
'video': user.translated('shareVideo_button'),
|
||||
}[content_type_declared],
|
||||
'switch_inline_query': f"C{content.cid.serialize_v2()}"
|
||||
}],
|
||||
[{
|
||||
|
||||
@@ -100,7 +100,7 @@ class PlayerTemplates:
|
||||
if self.bot_id == 1:
|
||||
# Buttons for sharing and opening in app
|
||||
inline_keyboard_array.append([{
|
||||
'text': self.user.translated('shareTrack_button'),
|
||||
'text': self.user.translated('shareVideo_button'),
|
||||
'switch_inline_query': f"C{content.cid.serialize_v2()}",
|
||||
}])
|
||||
inline_keyboard_array.append([{
|
||||
|
||||
Reference in new issue
Block a user