Require id parameter for API.destroy_direct_message
authorHarmon <Harmon758@gmail.com>
Wed, 10 Feb 2021 19:30:44 +0000 (13:30 -0600)
committerHarmon <Harmon758@gmail.com>
Wed, 10 Feb 2021 19:30:44 +0000 (13:30 -0600)
tweepy/api.py

index de7d6da2d75e5b1da5d8f2db186157c095e34e86..f5e8b43acfa2039a7cb23544b3614bf3ceadc6eb 100644 (file)
@@ -543,11 +543,11 @@ class API:
             json_payload=json_payload, **kwargs
         )
 
-    def destroy_direct_message(self, *args, **kwargs):
+    def destroy_direct_message(self, id, *args, **kwargs):
         """ :reference: https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/delete-message-event
         """
         return self.request(
-            'DELETE', 'direct_messages/events/destroy', *args,
+            'DELETE', 'direct_messages/events/destroy', id, *args,
             endpoint_parameters=(
                 'id',
             ), **kwargs