Update iter_ usages with get_

This commit is contained in:
Lonami Exo
2022-02-04 13:09:57 +01:00
parent 3b12cc3e51
commit ae43a47602
8 changed files with 30 additions and 30 deletions

View File

@@ -75,7 +75,7 @@ loops or use ``async with``:
async with client:
# ^ this is an asynchronous with block
async for message in client.iter_messages(chat):
async for message in client.get_messages(chat):
# ^ this is a for loop over an asynchronous generator
print(message.sender.username)

View File

@@ -28,7 +28,7 @@ In short, you should do this:
buttons = await event.get_buttons()
async def main():
async for message in client.iter_messages('me', 10):
async for message in client.get_messages('me', 10):
# Methods from the client always have these properties ready
chat = message.input_chat
sender = message.sender