using Tweepy to tweet text with media

I created a python twitter bot using tweepy, that tweet only text (relevant part of the script below). currently i’m using tweepy.client because from what i understood only twitter API v2 can post text tweets (free API access, i have no intention paying to twitter).i would like to attach media to tweets from this bot (spesific media to spesific event), and i wanted to know if somehow i can also use tweepy API (i.e API v1.1), so i would be able to do this (from what i understood, the free v1.1 tier allow posting media but doesn’t allow powting text)

this is the relevant part of my script (as the full script is unfourtently really long and doesn’t have a good readability):

client = tweepy.Client(
    consumer_key="xxxxxx",
    consumer_secret="xxxxxx",
    access_token="xxxxxx",
    access_token_secret="xxxxxx",
    wait_on_rate_limit=True
)
def calculate_event_hash(event):
    composite_key = f"{event['type']}-{event['player_name']}-{event['rival_team_name']}"
    return hashlib.sha256(composite_key.encode()).hexdigest()

def has_event_been_tweeted(event_hash):
    try:
        with open(File_name, "r") as file:
            return event_hash in file.read()
    except FileNotFoundError:
        return False

def mark_event_as_tweeted(event_hash):
    with open(File_name, "a") as file:
        file.write(event_hash + "n")

def tweet_event(event, text):
    try:
        event_hash = calculate_event_hash(event)
        if not has_event_been_tweeted(event_hash):
            if not debug_mode:
                client.create_tweet(text=text)
                logger.tweet("Tweeted: %s",text)
                mark_event_as_tweeted(event_hash)
            else:
                logger.tweet("Tweet not sent (debug mode): %s",text)
        else:
            logger.tweet("Event has already been tweeted: %s",text)
    except Exception as e:
        logging.error('Error tweeting %s: %s', text, e, exc_info=True)
        

def tweet_starting_player(player_name, team_name, rival_team_name, short_name,competition, match_id):
    event = {'type': 'starting_player', 'player_name': player_name, 'team_name': team_name, 'rival_team_name': rival_team_name, 'short_name': short_name, 'competition':competition, 'id': match_id}
    text = f"{player_name} פותח בהרכב {team_name} למשחק {competition} נגד {rival_team_name}nיאללה {short_name}, תעשה אותנו גאים!"
    tweet_event(event,text)


def tweet_not_starting(player_name, team_name, rival_team_name,competition,match_id):
    event = {'type': 'not_starting', 'player_name': player_name, 'team_name': team_name, 'rival_team_name': rival_team_name,'competition':competition,'id': match_id}
    text = f"לצערנו {player_name} על הספסל של {team_name} למשחק {competition} נגד {rival_team_name}"
    tweet_event(event,text)


def tweet_player_event(match_status, event_type, event_time, player_name, team_name, rival_team_name, leader, short_name, current_score, match_id):
    event_texts = {
        'own_goal': f'סעמק!n{player_name} שם שער עצמי בדקה ה-{event_time} נגד {rival_team_name}',
        'goal': f"יופי {short_name}!n{player_name} כובש בדקה ה-{event_time}",
        'assist': f"יופי {short_name}!n{player_name} מבשל בדקה ה-{event_time}",
        'var': f"סעמק!n{player_name} כובש בדקה ה-{event_time}, אבל ה-VAR פסל את השער",
        'red_card': f"מאנייק!nהשופט הרשע מרחיק את {player_name} בדקה ה-{event_time}, והוא יאלץ לראות את שאר המשחק מהיציע",
        'sub_in': f"קדימה {short_name}!n{player_name} נכנס למגרש בדקה ה-{event_time} במדי {team_name} נגד {rival_team_name}",
        'sub_out': f"חבל שהמאמן אנטישמיn{player_name} מוחלף בדקה ה-{event_time} למשחק נגד {rival_team_name}"
    }
    text = event_texts.get(event_type, "")
    if leader and match_status not in ['הסתיים לאחרונה', 'טרם החל']:
        if leader == rival_team_name:
            if event_type in ['goal', 'assist','own_goal']:
                text += f", {team_name} כעת בפיגור {current_score} נגד {rival_team_name}"
            if event_type == 'var':
                text += f", התוצאה נשארת {current_score} לטובת {rival_team_name}"
        elif leader == team_name:
            if event_type in ['goal', 'assist','own_goal']:
                text += f", {team_name} כעת מובילה {current_score} על {rival_team_name}!"
            if event_type == 'var':
                text += f", התוצאה נשארת {current_score} לטובת {team_name}"
    elif leader == None and match_status not in ['הסתיים לאחרונה', 'טרם החל']:
        if event_type in ['goal', 'assist','own_goal']:
                text += f", {team_name} משווה ל{current_score} נגד {rival_team_name}!"
        if event_type == 'var':
                text += f", התוצאה נשארת שוויון {current_score}"
    event = {'type': event_type, 'player_name': player_name, 'event_time': event_time, 'team_name': team_name, 'rival_team_name': rival_team_name,'id': match_id}
    tweet_event(event,text)


def tweet_player_stats(player_name, minutes_played, rival_team_name, stats, team_name,current_score, outcome,ranking,match_id):
    event = {'type': 'player_stats', 'player_name': player_name, 'team_name': team_name, 'rival_team_name': rival_team_name,'id': match_id}
    stats_text = ", ".join([f"{stat['name']} {stat['value']}" if stat['value'] == 'אחד' else f"{stat['value']} {stat['name']}" for stat in stats if stat['name'] != 'דקות'])
    outcome_prepositions = {
    'מנצחת': 'את',
    'מפסידה': 'ל',
    'עושה תיקו': 'עם'}
    preposition = outcome_prepositions.get(outcome, 'נגד')
    if preposition == 'ל':
        text = f"{team_name} {outcome} {current_score} {preposition}{rival_team_name}n{player_name} שיחק {minutes_played} דקות"
    else:
        text = f"{team_name} {outcome} {current_score} {preposition} {rival_team_name}n{player_name} שיחק {minutes_played} דקות"
    if stats and stats_text:
        text += f" וסיים עם {stats_text}"
        if ranking is not None and ranking > 0:
            text += f", וציון {ranking} מ-365"
    tweet_event(event,text)

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật