Change API.send_direct_message parameters to be keyword-only
authorHarmon <Harmon758@gmail.com>
Wed, 10 Feb 2021 19:29:34 +0000 (13:29 -0600)
committerHarmon <Harmon758@gmail.com>
Wed, 10 Feb 2021 19:29:34 +0000 (13:29 -0600)
Change quick_reply_options, attachment_type, attachment_media_id, and ctas API.send_direct_message parameters to be keyword-only

tweepy/api.py

index 213c9895b391e9dffb50ddb8b7398d5d7325be80..de7d6da2d75e5b1da5d8f2db186157c095e34e86 100644 (file)
@@ -512,7 +512,7 @@ class API:
         )
 
     @payload('direct_message')
-    def send_direct_message(self, recipient_id, text, quick_reply_options=None,
+    def send_direct_message(self, recipient_id, text, *, quick_reply_options=None,
                             attachment_type=None, attachment_media_id=None,
                             ctas=None, **kwargs):
         """ :reference: https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/new-event