def send_ts_users_in_group(bot, update, chat_data, group_id=None):
message = update.effective_message
text = '?? ' + _('*Group users:*') + '\n\n' \
+ _('Here is a list of all users in this group, pressing any of them will take you to his detail.')
if group_id is not None:
chat_data[message.message_id]['group_id'] = group_id
else:
group_id = chat_data[message.message_id]['group_id']
users = get_ts_users_in_group(group_id)
users = sorted(users, key=lambda user: user['client_lastconnected'], reverse=True)
back_button_row = [InlineKeyboardButton('?? ' + _('Back'), callback_data='GROUP_DETAIL_USERS_%s_BACK' % group_id)]
paginate_items(bot, update, chat_data, items=users, principal_property='client_nickname',
backend_property='client_database_id', text=text, callback='GROUP_DETAIL_USERS',
additional_row=back_button_row)
评论列表
文章目录