skip to Main Content

send Youtube videos to telegram – Telegram API

i wrote this program : import scrapetube import hashlib import telegram import requests import json from pytube import YouTube from time import sleep import os bot_token = 'my token' bot_chatID = '@PinkPanthersShow' bot = telegram.Bot(token=f'{bot_token}') c_videos = scrapetube.get_channel("UC1fIyfhQtm1fSljyKBf2uKA") videos =…

VIEW QUESTION

How to store user data and display them according to their corresponding callbacks – Telegram API

Here's my code: from telegram import * from telegram.ext import * import telegram, telegram.ext u = Updater('TOKEN', use_context=True) j=u.job_queue def set(update: Update, context: CallbackContext): user_says=' '.join(context.args) user_says=user_says.split(' ') global item, chat_id item=user_says[1:] chat_id=update.effective_chat.id j.run_once(callback, int(user_says[0])) def callback(context: telegram.ext.CallbackContext): context.bot.send_message(chat_id=chat_id, text=f'Great…

VIEW QUESTION
Back To Top
Search