2

Within the last 2 weeks or so one of my Twitter cleanup scripts stopped working. It appears that there is no longer an attribute for destroy_message which is used to delete sent DMs. Was this removed or renamed? Here is my code and the error.

for tweet in tweets:
           print "Deleting: " + tweet["text"]
           result = self._api.destroy_message(id = tweet["id"])

Here is the error:

Getting sent DMs....
Deleting: Sure no problem
Traceback (most recent call last):

File "scrub_twitter.py", line 127, in <module>
obj.delete_sent_dms()
File "scrub_twitter.py", line 102, in delete_sent_dms
result = self._api.destroy_message(id = tweet["id"])
AttributeError: 'Twython' object has no attribute 'destroy_message'
killpacket
  • 21
  • 1

1 Answers1

1

Yes, it has been renamed to:

destroy_direct_message(**params)

See here.

Dair
  • 15,910
  • 9
  • 62
  • 107