From dfb09a7255191ce79db5ea7990a26492a860fae5 Mon Sep 17 00:00:00 2001 From: Lasse Studion Date: Sun, 18 Dec 2022 17:32:06 +0100 Subject: [PATCH] Added reply_to_private() --- twitter_api.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/twitter_api.py b/twitter_api.py index 1594326..b2a34d8 100644 --- a/twitter_api.py +++ b/twitter_api.py @@ -100,4 +100,9 @@ class API: def reply_with_url(self, tweet_id, url, username): params = {"reply": {"in_reply_to_tweet_id": str(tweet_id)}, "text": f"Hi {username}! Download a list of Mastodon users that you are following on Twitter: {url} Take that csv-file and import in Mastodon (Settings > Import)."} - self.post_tweet(params=params) \ No newline at end of file + self.post_tweet(params=params) + + def reply_to_private(self, tweet_id, username): + """ Reply to private profiles. """ + params = {"reply": {"in_reply_to_tweet_id": str(tweet_id)}, "text": f"Hi {username}! Because you have a private I can't see what profiles you are following."} + self.post_tweet(params=params) \ No newline at end of file