Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
xjxckk authored Feb 17, 2022
1 parent 0c4348e commit f520bc5
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions twitter/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3180,15 +3180,7 @@ def PostDirectMessage(self,
if return_json:
return data
else:
dm = DirectMessage(
created_at=data['event']['created_timestamp'],
id=data['event']['id'],
recipient_id=data['event']['message_create']['target']['recipient_id'],
sender_id=data['event']['message_create']['sender_id'],
text=data['event']['message_create']['message_data']['text'],
)
dm._json = data
return dm
return [DirectMessage.NewFromJsonDict(x) for x in data]

def DestroyDirectMessage(self, message_id, include_entities=True, return_json=False):
"""Destroys the direct message specified in the required ID parameter.
Expand Down

0 comments on commit f520bc5

Please sign in to comment.