Iterator ABCs#

संस्करण 4.3.2 से नया .

महत्त्वपूर्ण

This page contains metaclasses. As this is an advanced Python topic you should not try to use these methods if you don't have the experience.

class interactions.utils.abc.base_iterators.BaseAsyncIterator[स्रोत]#

आधार: ABC

संस्करण 4.3.2 से नया .

A base class for async iterators.

abstract __init__()[स्रोत]#

Initialise the iterator

__aiter__()[स्रोत]#
async flatten()[स्रोत]#

Returns all items of the iterator as list

abstract async __anext__()[स्रोत]#

Return the next object

प्रदत्त प्रकार :

_O

class interactions.utils.abc.base_iterators.BaseIterator[स्रोत]#

आधार: ABC

संस्करण 4.3.2 से नया .

A base class for iterators.

abstract __init__()[स्रोत]#

Initialise the iterator

__iter__()[स्रोत]#
flatten()[स्रोत]#

Returns all items of the iterator as list

abstract __next__()[स्रोत]#

Return the next object

प्रदत्त प्रकार :

_O

class interactions.utils.abc.base_iterators.DiscordPaginationIterator(obj=None, _client=None, maximum=inf, start_at=<interactions.MISSING>, check=None)[स्रोत]#

आधार: BaseAsyncIterator

संस्करण 4.3.2 से नया .

A base class for Discord Pagination Iterators.

__init__(obj=None, _client=None, maximum=inf, start_at=<interactions.MISSING>, check=None)[स्रोत]#

Create a Discord Pagination iterator. All attributes are optional but may be useful for getting Discord objects. Check usages in the AsyncMembersIterator and AsyncHistoryIterator or Guild.get_members() and Channel.history() for more information about the arguments.

मापदण्ड:
  • obj (Union[int, str, "Snowflake", _T]) --

  • _client (Optional["HTTPClient"]) --

  • maximum (Optional[int]) --

  • start_at (Optional[Union[int, str, "Snowflake", _O]]) --

  • check (Optional[Callable[[_O], Union[bool, Awaitable[bool]]]]) --

__aiter__()#
abstract async __anext__()#

Return the next object

प्रदत्त प्रकार :

_O

async flatten()#

Returns all items of the iterator as list