mirror of
				https://github.com/LonamiWebs/Telethon.git
				synced 2025-11-04 01:47:27 +03:00 
			
		
		
		
	fix get_dialogs() return type in example
Catching up with 238198db where get_dialogs
return type was changed.
			
			
This commit is contained in:
		
							parent
							
								
									33d6afa0bd
								
							
						
					
					
						commit
						b9cd9a6639
					
				| 
						 | 
				
			
			@ -138,15 +138,15 @@ class InteractiveTelegramClient(TelegramClient):
 | 
			
		|||
 | 
			
		||||
            # Entities represent the user, chat or channel
 | 
			
		||||
            # corresponding to the dialog on the same index.
 | 
			
		||||
            dialogs, entities = self.get_dialogs(limit=dialog_count)
 | 
			
		||||
            dialogs = self.get_dialogs(limit=dialog_count)
 | 
			
		||||
 | 
			
		||||
            i = None
 | 
			
		||||
            while i is None:
 | 
			
		||||
                print_title('Dialogs window')
 | 
			
		||||
 | 
			
		||||
                # Display them so the user can choose
 | 
			
		||||
                for i, entity in enumerate(entities, start=1):
 | 
			
		||||
                    sprint('{}. {}'.format(i, get_display_name(entity)))
 | 
			
		||||
                for i, dialog in enumerate(dialogs, start=1):
 | 
			
		||||
                    sprint('{}. {}'.format(i, get_display_name(dialog.entity)))
 | 
			
		||||
 | 
			
		||||
                # Let the user decide who they want to talk to
 | 
			
		||||
                print()
 | 
			
		||||
| 
						 | 
				
			
			@ -177,7 +177,7 @@ class InteractiveTelegramClient(TelegramClient):
 | 
			
		|||
                    i = None
 | 
			
		||||
 | 
			
		||||
            # Retrieve the selected user (or chat, or channel)
 | 
			
		||||
            entity = entities[i]
 | 
			
		||||
            entity = dialogs[i].entity
 | 
			
		||||
 | 
			
		||||
            # Show some information
 | 
			
		||||
            print_title('Chat with "{}"'.format(get_display_name(entity)))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user