This commit is contained in:
Lucy Joshua 2023-03-10 21:16:45 +02:00
parent 7a2290158b
commit e9b62a5782

View file

@ -125,10 +125,12 @@ class BotYamPoster(tweepy.StreamingClient):
if message['sender_id'] == self.user_id: if message['sender_id'] == self.user_id:
return return
print("Someone sliding in DMs.")
conn = Connector() conn = Connector()
# Get the text of the message # Get the text of the message
text = message['text'] text = message.data['text']
# Find the URL of the tweet in the message # Find the URL of the tweet in the message
tweet_url_regex = r'https?://twitter.com/\w+/status/(\d+)(?:\?.*)?$' tweet_url_regex = r'https?://twitter.com/\w+/status/(\d+)(?:\?.*)?$'