Iterator ABCs#
Neu in Version 4.3.2.
Wichtig
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[Quellcode]#
Bases:
ABCNeu in Version 4.3.2.
A base class for async iterators.
- abstract __init__()[Quellcode]#
Initialise the iterator
- __aiter__()[Quellcode]#
- async flatten()[Quellcode]#
Returns all items of the iterator as list
- abstract async __anext__()[Quellcode]#
Return the next object
- Rückgabetyp:
_O
- class interactions.utils.abc.base_iterators.BaseIterator[Quellcode]#
Bases:
ABCNeu in Version 4.3.2.
A base class for iterators.
- abstract __init__()[Quellcode]#
Initialise the iterator
- __iter__()[Quellcode]#
- flatten()[Quellcode]#
Returns all items of the iterator as list
- abstract __next__()[Quellcode]#
Return the next object
- Rückgabetyp:
_O
- class interactions.utils.abc.base_iterators.DiscordPaginationIterator(obj=None, _client=None, maximum=inf, start_at=<interactions.MISSING>, check=None)[Quellcode]#
Bases:
BaseAsyncIteratorNeu 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)[Quellcode]#
Create a Discord Pagination iterator. All attributes are optional but may be useful for getting Discord objects. Check usages in the
AsyncMembersIteratorandAsyncHistoryIteratororGuild.get_members()andChannel.history()for more information about the arguments.
- __aiter__()#
- abstract async __anext__()#
Return the next object
- Rückgabetyp:
_O
- async flatten()#
Returns all items of the iterator as list