@Amime.on_callback_query(filters.regex('^tvshort_trending7 anime (?P<page>\\d+)'))
async def anime_suggestions(bot: Amime, callback: CallbackQuery):
    page = int(callback.matches[0]['page'])
    message = callback.message
    lang = callback._lang
    keyboard = []
    async with httpx.AsyncClient(http2=True) as client:
        response = (await client.post(url='https://graphql.anilist.co', json=dict(query='\n                query($per_page: Int) {\n                    Page(page: 8, perPage: $per_page) {\n                        media(type: ANIME, format: TV_SHORT, sort: TRENDING_DESC, status: FINISHED) {\n                            id\n                            title {\n                                romaji\n                                english\n                                native\n                            }\n                            siteUrl\n                        }\n                    }\n                }\n                ', variables=dict(perPage=100)), headers={'Content-Type': 'application/json', 'Accept': 'application/json'}))
        data = response.json()
        (await client.aclose())
        if data['data']:
            items = data['data']['Page']['media']
            suggestions = [Anime(id=item['id'], title=item['title'], url=item['siteUrl']) for item in items]
            layout = Pagination(suggestions, item_data=(lambda i, pg: f'menu {i.id}'), item_title=(lambda i, pg: i.title.romaji), page_data=(lambda pg: f'tvshort_trending7 anime {pg}'))
            lines = layout.create(page, lines=8)
            if (len(lines) > 0):
                keyboard += lines
    keyboard.append([(lang.Prev, 'tvshort_trending6 anime 1'), (lang.Next, 'tvshort_trending8 anime 1')])
    keyboard.append([(lang.back_button, 'tvshort_menu')])
    (await message.edit_text(lang.suggestions_text, reply_markup=ikb(keyboard)))
@Amime.on_callback_query(filters.regex('^tvshort_trending7 anime (?P<page>\\d+)'))
async def anime_suggestions(bot: Amime, callback: CallbackQuery):
    page = int(callback.matches[0]['page'])
    message = callback.message
    lang = callback._lang
    keyboard = []
    async with httpx.AsyncClient(http2=True) as client:
        response = (await client.post(url='https://graphql.anilist.co', json=dict(query='\n                query($per_page: Int) {\n                    Page(page: 8, perPage: $per_page) {\n                        media(type: ANIME, format: TV_SHORT, sort: TRENDING_DESC, status: FINISHED) {\n                            id\n                            title {\n                                romaji\n                                english\n                                native\n                            }\n                            siteUrl\n                        }\n                    }\n                }\n                ', variables=dict(perPage=100)), headers={'Content-Type': 'application/json', 'Accept': 'application/json'}))
        data = response.json()
        (await client.aclose())
        if data['data']:
            items = data['data']['Page']['media']
            suggestions = [Anime(id=item['id'], title=item['title'], url=item['siteUrl']) for item in items]
            layout = Pagination(suggestions, item_data=(lambda i, pg: f'menu {i.id}'), item_title=(lambda i, pg: i.title.romaji), page_data=(lambda pg: f'tvshort_trending7 anime {pg}'))
            lines = layout.create(page, lines=8)
            if (len(lines) > 0):
                keyboard += lines
    keyboard.append([(lang.Prev, 'tvshort_trending6 anime 1'), (lang.Next, 'tvshort_trending8 anime 1')])
    keyboard.append([(lang.back_button, 'tvshort_menu')])
    (await message.edit_text(lang.suggestions_text, reply_markup=ikb(keyboard)))