Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_dm_history error #237

Open
Cryptojoyz opened this issue Oct 18, 2024 · 0 comments
Open

get_dm_history error #237

Cryptojoyz opened this issue Oct 18, 2024 · 0 comments

Comments

@Cryptojoyz
Copy link

use demo code and input a user id then it shows error.
messages = await client.get_dm_history('')

File d:\Anaconda\Lib\site-packages\twikit\client\client.py:3045, in Client.get_dm_history(self, user_id, max_id)
3043 messages = []
3044 for item in items:
-> 3045 message_info = item['message']['message_data']
3046 messages.append(Message(
3047 self,
3048 message_info,
3049 message_info['sender_id'],
3050 message_info['recipient_id']
3051 ))
3053 return Result(
3054 messages,
3055 partial(self.get_dm_history, user_id, messages[-1].id),
3056 messages[-1].id
3057 )

KeyError: 'message'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant