From bcb56abce37d4252080fca6df796b7fc3dd2ae76 Mon Sep 17 00:00:00 2001 From: Harmon Date: Wed, 10 Feb 2021 13:30:44 -0600 Subject: [PATCH] Require id parameter for API.destroy_direct_message --- tweepy/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tweepy/api.py b/tweepy/api.py index de7d6da..f5e8b43 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -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 -- 2.25.1