Iterator ABCs#
New in version 4.3.2.
Important
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[source]#
Bases:
ABC
New in version 4.3.2.
A base class for async iterators.
- class interactions.utils.abc.base_iterators.BaseIterator[source]#
Bases:
ABC
New in version 4.3.2.
A base class for iterators.
- class interactions.utils.abc.base_iterators.DiscordPaginationIterator(obj=None, _client=None, maximum=inf, start_at=<interactions.MISSING>, check=None)[source]#
Bases:
BaseAsyncIterator
New in version 4.3.2.
A base class for Discord Pagination Iterators.
- __init__(obj=None, _client=None, maximum=inf, start_at=<interactions.MISSING>, check=None)[source]#
Create a Discord Pagination iterator. All attributes are optional but may be useful for getting Discord objects. Check usages in the
AsyncMembersIterator
andAsyncHistoryIterator
orGuild.get_members()
andChannel.history()
for more information about the arguments.
- __aiter__()#
- abstract async __anext__()#
Return the next object
- Return type:
_O
- async flatten()#
Returns all items of the iterator as list