đ¤ New bot
đ Name: tdl_bot
đ Username: @tdl_bot
âī¸ Rating: âī¸âī¸âī¸ (3.9/5 on 63 votes)
âââ
âšī¸Description: This bot allows you to find music from YouTube Music without sound filters, in the original version, with AAC 128 Kbps speed quality, in file format.
Just use the bot and enjoy!
đ Languages: English Deutsch Russian Ukrain Uzbek Pols Kazak Kyrgyz Azarbayjan Arabic
đŦ Supports inline: no
đĨ Groups: yes
#ī¸âŖ Tags: #youtube #music #original #utubemusic #tdl_bot #tdl_music #telegram_music #original_music #mp3 #avi #musics
It is forbidden to download, stream, reproduce, or by any means, share, or consume, content without explicit permission from the content creator or legal copyright holder. BotsArchive is not associated nor affiliated with this bot and does not endorse any use of it. If you believe this bot is violating your intellectual property, please email us at abuse@botsarchive.com to get it removed from the archive.
đ Name: tdl_bot
đ Username: @tdl_bot
âī¸ Rating: âī¸âī¸âī¸ (3.9/5 on 63 votes)
âââ
âšī¸Description: This bot allows you to find music from YouTube Music without sound filters, in the original version, with AAC 128 Kbps speed quality, in file format.
Just use the bot and enjoy!
đ Languages: English Deutsch Russian Ukrain Uzbek Pols Kazak Kyrgyz Azarbayjan Arabic
đŦ Supports inline: no
đĨ Groups: yes
#ī¸âŖ Tags: #youtube #music #original #utubemusic #tdl_bot #tdl_music #telegram_music #original_music #mp3 #avi #musics
It is forbidden to download, stream, reproduce, or by any means, share, or consume, content without explicit permission from the content creator or legal copyright holder. BotsArchive is not associated nor affiliated with this bot and does not endorse any use of it. If you believe this bot is violating your intellectual property, please email us at abuse@botsarchive.com to get it removed from the archive.
Forwarding media group messages issue
I've created a bot on Telegram to clone chats, but the channel I've been trying to clone has media group messages, which means media is organized as a single grid of messages. The problem is: as my bot forwards the messages, the media is individually forwarded, breaking the grid structure and caption. Anyone has a guess on how to clone the chat respecting the original media group from the origin channel? Code below: from __future__ import annotationsimport argparseimport jsonimport osimport timefrom configparser import ConfigParserfrom pathlib import Pathimport pyrogramfrom pyrogram.errors import ChannelInvalid, FloodWait, PeerIdInvalidfrom setup import versionDELAY_AMOUNT = 10def get_config_data(path_file_config): """get default configuration data from file config.ini Returns: dict: config data """ config_file = ConfigParser() config_file.read(path_file_config) default_config = dict(config_file["default"]) return default_configold_term = '#Original Channel'new_term = '#Clone Channel'def replace_term(text): global old_term, new_term return text.replace(old_term, new_term)def forward_text(message, destination_chat): text = message.text.markdown if text: text = replace_term(text) try: tg.send_message( chat_id=destination_chat, text=text, disable_notification=True, disable_web_page_preview=True, ) return except FloodWait as e: print(f"..FloodWait {e.value} seconds..") time.sleep(e.value) except Exception as e: print(f"trying again... Due to: {e}") time.sleep(10) forward_text(message, destination_chat)def forward_media_group(message, destination_chat): caption = message.caption media_group_id = message.media_group_id try: tg.send_media_group( chat_id=destination_chat, media=media_group_id, disable_notification=True, caption=caption, ) return except FloodWait as e: print(f"..FloodWait {e.value} seconds..") time.sleep(e.value) except Exception as e: print(f"trying again... Due to: {e}") time.sleep(10) forward_media_group(message, destination_chat)def get_caption(message): if message.caption: return message.caption elif message.document: return message.document.caption else: return Nonedef forward_video(message, destination_chat): caption = get_caption(message) if caption: caption = replace_term(caption) video_id = message.video.file_id try: tg.send_video( chat_id=destination_chat, video=video_id, disable_notification=True, caption=caption, ) return except FloodWait as e: print(f"..FloodWait {e.value} seconds..") time.sleep(e.value) except Exception as e: print(f"trying again... Due to: {e}") time.sleep(10) forward_video(message, destination_chat)def forward_photo(message, destination_chat): caption = get_caption(message) if caption: caption = replace_term(caption) photo_id = message.photo.file_id try: tg.send_photo( chat_id=destination_chat, photo=photo_id, disable_notification=True, caption=caption, ) return except FloodWait as e: print(f"..FloodWait {e.value} seconds..") time.sleep(e.value) except Exception as e: print(f"trying again... Due to: {e}") time.sleep(10) forward_photo(message, destination_chat)def get_sender(message): if message.photo: return forward_photo if message.text: return forward_text if message.video: return forward_video if message.media_group: return forward_media_group print("\nNot recognized message type:\n") print(message) raise Exceptiondef get_input_type_to_copy(): answer = "" print("0 - All files") print("1 - Photos") print("2 - Text") print("3 - Videos") print("4 - Media Groups\n") print( "Enter the number(s) of the file type to clone, separating by comma." ) print("For example, to copy photos and documents type: 1,3") answer = input("Your answer: ") return answerdef get_files_type_excluded_by_input(input_string): files_type_excluded = [] if input_string == "" or "0" in input_string: return files_type_excluded else: if "1" not in input_string: files_type_excluded += [forward_photo] if "2" not in input_string: files_type_excluded += [forward_text] if "3" not in input_string: files_type_excluded += [forward_video]âĻ
I've created a bot on Telegram to clone chats, but the channel I've been trying to clone has media group messages, which means media is organized as a single grid of messages. The problem is: as my bot forwards the messages, the media is individually forwarded, breaking the grid structure and caption. Anyone has a guess on how to clone the chat respecting the original media group from the origin channel? Code below: from __future__ import annotationsimport argparseimport jsonimport osimport timefrom configparser import ConfigParserfrom pathlib import Pathimport pyrogramfrom pyrogram.errors import ChannelInvalid, FloodWait, PeerIdInvalidfrom setup import versionDELAY_AMOUNT = 10def get_config_data(path_file_config): """get default configuration data from file config.ini Returns: dict: config data """ config_file = ConfigParser() config_file.read(path_file_config) default_config = dict(config_file["default"]) return default_configold_term = '#Original Channel'new_term = '#Clone Channel'def replace_term(text): global old_term, new_term return text.replace(old_term, new_term)def forward_text(message, destination_chat): text = message.text.markdown if text: text = replace_term(text) try: tg.send_message( chat_id=destination_chat, text=text, disable_notification=True, disable_web_page_preview=True, ) return except FloodWait as e: print(f"..FloodWait {e.value} seconds..") time.sleep(e.value) except Exception as e: print(f"trying again... Due to: {e}") time.sleep(10) forward_text(message, destination_chat)def forward_media_group(message, destination_chat): caption = message.caption media_group_id = message.media_group_id try: tg.send_media_group( chat_id=destination_chat, media=media_group_id, disable_notification=True, caption=caption, ) return except FloodWait as e: print(f"..FloodWait {e.value} seconds..") time.sleep(e.value) except Exception as e: print(f"trying again... Due to: {e}") time.sleep(10) forward_media_group(message, destination_chat)def get_caption(message): if message.caption: return message.caption elif message.document: return message.document.caption else: return Nonedef forward_video(message, destination_chat): caption = get_caption(message) if caption: caption = replace_term(caption) video_id = message.video.file_id try: tg.send_video( chat_id=destination_chat, video=video_id, disable_notification=True, caption=caption, ) return except FloodWait as e: print(f"..FloodWait {e.value} seconds..") time.sleep(e.value) except Exception as e: print(f"trying again... Due to: {e}") time.sleep(10) forward_video(message, destination_chat)def forward_photo(message, destination_chat): caption = get_caption(message) if caption: caption = replace_term(caption) photo_id = message.photo.file_id try: tg.send_photo( chat_id=destination_chat, photo=photo_id, disable_notification=True, caption=caption, ) return except FloodWait as e: print(f"..FloodWait {e.value} seconds..") time.sleep(e.value) except Exception as e: print(f"trying again... Due to: {e}") time.sleep(10) forward_photo(message, destination_chat)def get_sender(message): if message.photo: return forward_photo if message.text: return forward_text if message.video: return forward_video if message.media_group: return forward_media_group print("\nNot recognized message type:\n") print(message) raise Exceptiondef get_input_type_to_copy(): answer = "" print("0 - All files") print("1 - Photos") print("2 - Text") print("3 - Videos") print("4 - Media Groups\n") print( "Enter the number(s) of the file type to clone, separating by comma." ) print("For example, to copy photos and documents type: 1,3") answer = input("Your answer: ") return answerdef get_files_type_excluded_by_input(input_string): files_type_excluded = [] if input_string == "" or "0" in input_string: return files_type_excluded else: if "1" not in input_string: files_type_excluded += [forward_photo] if "2" not in input_string: files_type_excluded += [forward_text] if "3" not in input_string: files_type_excluded += [forward_video]âĻ