Source code for discord.ext.paginator.dropdown_pag

from __future__ import annotations
from discord.ext.commands import Context
from discord import Interaction, SelectOption
from discord.ui import Select

from .paginator import Paginator, DefaultView

from typing import List, Optional, Union


[docs]class GenPlaceholder(object): """ Class used for generating placeholders dynamically between pages, .. rubric:: Example .. code-block:: py from discord.ext.paginator import GenPlaceholder class MyPlaceholder(GenPlaceholder): def generate(self, paginator): return 'Menu Page {current_page} out of {max_page}'.format( current_page=paginator.current_page + 1, max_page=paginator.max_page + 1 ) """ def generate(self, paginator: DropdownPaginator) -> str: return 'Page {current} out of {max}'.format( current=paginator.current_page + 1, max=paginator.max_page + 1)