From 8e0507dd1456a42e8c4258bed37295e1116c1bd9 Mon Sep 17 00:00:00 2001 From: Harmon Date: Wed, 10 Feb 2021 13:25:43 -0600 Subject: [PATCH] Stop allowing positional arguments for API.list_direct_messages --- tweepy/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tweepy/api.py b/tweepy/api.py index 9545365..213c989 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -502,11 +502,11 @@ class API: @pagination(mode='dm_cursor') @payload('direct_message', list=True) - def list_direct_messages(self, *args, **kwargs): + def list_direct_messages(self, **kwargs): """ :reference: https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/list-events """ return self.request( - 'GET', 'direct_messages/events/list', *args, endpoint_parameters=( + 'GET', 'direct_messages/events/list', endpoint_parameters=( 'count', 'cursor' ), **kwargs ) -- 2.25.1