Giter Club home page Giter Club logo

clonechat's People

Contributors

apenasrr avatar upolar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

clonechat's Issues

Topics in groups, how to download a specific Topic.

Telegram groups can host huge communities with hundreds of thousands of users. To maintain readability in these chats, groups with more than 200 members can now activate topics and create separate spaces for any topic.
Topics function as individual chats within the group, with their own shared media and notification settings.
Example of topic id in a group: t.me/c/XXXXXXXXXX/YYY/messages
How can download only messages of topic YYY ?

Sugestão

Funcionar.. Funciona, mas nao tem como fazer com que ele sempre copie as mensagens e envie para o meu canal?
Porque so da para fazer 1 de vez..

Help, pretty new Not sure what the issue is..

Pasted the script error Im getting when running the coded?

Enter the number(s) of the file type to clone, separating by comma.
For example, to copy photos and documents type: 1,3
Your answer: 0
New cloning or continuation?
1 = new
2 = resume
Your answer: 1
2/9275 (blank id)
3/9275 (blank id)

Not recognized message type:

{
"": "Message",
"id": 4,
"from_user": {
"
": "User",
"id": 1104838547,
"is_self": true,
"is_contact": true,
"is_mutual_contact": false,
"is_deleted": false,
"is_bot": false,
"is_verified": false,
"is_restricted": false,
"is_scam": false,
"is_fake": false,
"is_support": false,
"is_premium": false,
"first_name": "A",
"status": "UserStatus.OFFLINE",
"last_online_date": "2024-02-10 13:32:49",
"username": "TheSearchEngine",
"phone_number": "*********"
},
"date": "2024-01-04 19:21:05",
"chat": {
"": "Chat",
"id": -1002072353912,
"type": "ChatType.SUPERGROUP",
"is_verified": false,
"is_restricted": false,
"is_creator": true,
"is_scam": false,
"is_fake": false,
"title": "TheXxXEngine",
"username": "TheXxXEngine",
"photo": {
"
": "ChatPhoto",
"small_file_id": "AQADBAADJMAxG-AWuVAAEAIAA4hT1a8W____iRRiN4_CXaIABB4E",
"small_photo_unique_id": "AgADJMAxG-AWuVA",
"big_file_id": "AQADBAADJMAxG-AWuVAAEAMAA4hT1a8W____iRRiN4_CXaIABB4E",
"big_photo_unique_id": "AgADJMAxG-AWuVA"
},
"dc_id": 4,
"has_protected_content": false,
"permissions": {
"_": "ChatPermissions",
"can_send_messages": true,
"can_send_media_messages": true,
"can_send_other_messages": true,
"can_send_polls": false,
"can_add_web_page_previews": true,
"can_change_info": false,
"can_invite_users": true,
"can_pin_messages": false
}
}
}
Traceback (most recent call last):
File "C:\Users\andy-\Desktop\clonechat-main\clonechat.py", line 674, in
main()
File "C:\Users\andy-\Desktop\clonechat-main\clonechat.py", line 560, in main
func_sender = get_sender(message)
File "C:\Users\andy-\Desktop\clonechat-main\clonechat.py", line 277, in get_sender
raise Exception
Exception

Increase download speed

I am a premium user on telegram and I would like to know if I can increase the download speed in the code?

Cant clone or download

hello somebody know how to bypass this error while cloning or downloading, bot cant run with this Restriction:

"dc_id": 1,
"has_protected_content": true,
"restrictions": [
{
"_": "Restriction",
"platform": "ios",
"reason": "porn",
"text": "This channel can\u2019t be displayed because it was used to spread pornographic content."
}

Illegal characters

Hello, friend! Your script is fantastic.
Can you solve a little problem that happened? The script does not recognize certain characters and ends up interrupting the process. A lot of channels I want to copy have emojis and the like in the name. Is there anything that can be done? Some way to replace those characters with any letter, I don't know.

Like this:

  • group name: Cur$0 | 🩺
  • name after change by script: CurAA AA (I replaced all weird characters with A, as an example).

Não realiza conexão com o telegram

Pessoal, já tentei de tudo até mesmo formatar a minha máquina, anteriormente o script conseguia em enviar qualquer coisa para o telegram, mas depois de atualização do Windows, só recebo o erro abaixo, alguem pode me ajudar por gentileza? E os scripts funcionam em outra máquina.

image

ERRO trying again... Due to: Peer id invalid

Can anyone help me with this error, I already searched the internet but I didn't find anything to solve it.

Enter the number(s) of the file type to clone, separating by comma.
For example, to copy photos and documents type: 1,3
Your answer: 0
New cloning or continuation?
1 = new
2 = resume
Your answer: 1
trying again... Due to: Peer id invalid: -1002166654067
trying again... Due to: Peer id invalid: -1002166654067
trying again... Due to: Peer id invalid: -1002166654067
trying again... Due to: Peer id invalid: -1002166654067
trying again... Due to: Peer id invalid: -1002166654067
trying again... Due to: Peer id invalid: -1002166654067
trying again... Due to: Peer id invalid: -1002166654067
trying again... Due to: Peer id invalid: -1002166654067
trying again... Due to: Peer id invalid: -1002166654067
trying again... Due to: Peer id invalid: -1002166654067
trying again... Due to: Peer id invalid: -1002166654067
trying again... Due to: Peer id invalid: -1002166654067
trying again... Due to: Peer id invalid: -1002166654067
trying again... Due to: Peer id invalid: -1002166654067
trying again... Due to: Peer id invalid: -1002166654067
trying again... Due to: Peer id invalid: -1002166654067
trying again... Due to: Peer id invalid: -1002166654067
trying again... Due to: Peer id invalid: -1002166654067
trying again... Due to: Peer id invalid: -1002166654067
trying again... Due to: Peer id invalid: -1002166654067

why am i getting this error?

trying again... Due to: Telegram says: [400 CHAT_ADMIN_REQUIRED] - The method requires chat admin privileges (caused by "messages.SendMessage")

'latin-1' codec can't encode characters in position 11-12: ordinal not in range

Traceback (most recent call last):
File "clonechat.py", line 647, in
main()
File "clonechat.py", line 530, in main
update_cache(CACHE_FILE, list_posted)
File "clonechat.py", line 395, in update_cache
with open(CACHE_FILE, mode="w") as file:
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 11-12: ordinal not in range(256)

[QUESTION] Calling get_message a lot in a short period give me flood wait?

Can we move the wait_a_moment function before func_sender(message, destination_chat)? If so It'll improve clone speed with my menu to select filetypes.

Something like that:

if func_sender in files_type_excluded:
    list_posted += [message.id]
    update_cache(CACHE_FILE, list_posted)
    continue
wait_a_moment(message_id)
func_sender(message, destination_chat)

I'm asking that because I'm wondering if Telegram will give FloodWait if I make a lot of get_message requests in a short period.

Edit the message before forwarding

Hello . How can I edit the message before it is forwarded? I want to read it and forward it if there are conditions. Im familiar with Python, I just need you to tell me the file name and line number that variable store messages

Não consigo clonar um canal

{
"": "Message",
"id": 2,
"sender_chat": {
"
": "Chat",
"id": -1002124032997,
"type": "ChatType.CHANNEL",
"is_verified": false,
"is_restricted": false,
"is_creator": false,
"is_scam": false,
"is_fake": false,
"title": "iQuímica 2023",
"photo": {
"": "ChatPhoto",
"small_file_id": "AQADAQADW60xG8s0EEUAEAIAAxvEwKwW____a6ktj2jpvcYABB4E",
"small_photo_unique_id": "AgADW60xG8s0EEU",
"big_file_id": "AQADAQADW60xG8s0EEUAEAMAAxvEwKwW____a6ktj2jpvcYABB4E",
"big_photo_unique_id": "AgADW60xG8s0EEU"
},
"dc_id": 1,
"has_protected_content": false
},
"date": "2024-01-12 21:38:19",
"chat": {
"
": "Chat",
"id": -1002124032997,
"type": "ChatType.CHANNEL",
"is_verified": false,
"is_restricted": false,
"is_creator": false,
"is_scam": false,
"is_fake": false,
"title": "iQuímica 2023",
"photo": {
"_": "ChatPhoto",
"small_file_id": "AQADAQADW60xG8s0EEUAEAIAAxvEwKwW____a6ktj2jpvcYABB4E",
"small_photo_unique_id": "AgADW60xG8s0EEU",
"big_file_id": "AQADAQADW60xG8s0EEUAEAMAAxvEwKwW____a6ktj2jpvcYABB4E",
"big_photo_unique_id": "AgADW60xG8s0EEU"
},
"dc_id": 1,
"has_protected_content": false
},
"mentioned": false,
"scheduled": false,
"from_scheduled": false,
"has_protected_content": false,
"views": 3582,
"forwards": 16,
"outgoing": false
}
Traceback (most recent call last):
File "C:\Users\huney\OneDrive\Área de Trabalho\clonechat-main\clonechat.py", line 674, in
main()
File "C:\Users\huney\OneDrive\Área de Trabalho\clonechat-main\clonechat.py", line 560, in main
func_sender = get_sender(message)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\huney\OneDrive\Área de Trabalho\clonechat-main\clonechat.py", line 277, in get_sender
raise Exception
Exception

Can't resume clone

Yesterday I started a cloning but today when I try to resume it, it does not want to continue. The program receives the command but does not process it

Clone Queue

Sorry for the inconvenience, i don't know if here is the right place for that.
But is it possible to implement a Clone queue, set chats in a row to Clone.
Congratulations for your development.

Error

This happen:

C:\Users\Samsung\Downloads\clonechat-main (1)\clonechat-main>python clonechat_protect_run.py
Could not find platform independent libraries
Python path configuration:
PYTHONHOME = (not set)
PYTHONPATH = (not set)
program name = 'python'
isolated = 0
environment = 1
user site = 1
safe_path = 0
import site = 1
is in build tree = 0
stdlib dir = 'C:\Users\Samsung\Downloads\clonechat-main (1)\clonechat-main\Lib'
sys._base_executable = 'C:\Users\Samsung\AppData\Local\Programs\Python\Python312\python.exe'
sys.base_prefix = 'C:\Users\Samsung\Downloads\clonechat-main (1)\clonechat-main'
sys.base_exec_prefix = 'C:\Users\Samsung\Downloads\clonechat-main (1)\clonechat-main'
sys.platlibdir = 'DLLs'
sys.executable = 'C:\Users\Samsung\AppData\Local\Programs\Python\Python312\python.exe'
sys.prefix = 'C:\Users\Samsung\Downloads\clonechat-main (1)\clonechat-main'
sys.exec_prefix = 'C:\Users\Samsung\Downloads\clonechat-main (1)\clonechat-main'
sys.path = [
'C:\Users\Samsung\AppData\Local\Programs\Python\Python312\python312.zip',
'C:\Users\Samsung\Downloads\clonechat-main (1)\clonechat-main',
'C:\Users\Samsung\Downloads\clonechat-main (1)\clonechat-main\Lib',
'C:\Users\Samsung\AppData\Local\Programs\Python\Python312',
]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x0000467c (most recent call first):

C:\Users\Samsung\Downloads\clonechat-main (1)\clonechat-main>cmd /k
C:\Users\Samsung\Downloads\clonechat-main (1)\clonechat-main>

KeyError: 'file_name'

I'm trying to download a protected channel I'm subscribed.
It's not working:

The chat history was saved. 223 posts.
Traceback (most recent call last):
  File "C:\clonechat-main\downloadall_run.py", line 8, in <module>
    main()
  File "C:\clonechat-main\downloadall_run.py", line 5, in main
    asyncio.run(downloadall.main())
  File "C:\Python312\Lib\asyncio\runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\asyncio\runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\asyncio\base_events.py", line 687, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "C:\clonechat-main\protect_content\downloadall.py", line 52, in main
    cloneplan.save_cloneplan(history_path, cloneplan_path)
  File "C:\clonechat-main\protect_content\cloneplan\cloneplan.py", line 106, in save_cloneplan
    cloneplan_list_dict = create_cloneplan(history_path)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\clonechat-main\protect_content\cloneplan\cloneplan.py", line 91, in create_cloneplan
    cloneplan_dict = enrich_fields(cloneplan_dict, msg, key)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\clonechat-main\protect_content\cloneplan\cloneplan.py", line 47, in enrich_fields
    cloneplan_dict["file_name"] = msg["video"]["file_name"]
                                  ~~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'file_name'

What do I have to do?

API ID e Hash não ficam mais salvos

Hoje começou a pedir API ID e Hash da conta toda vez que abro o prompt do Clonechat, e pede pra deletar o arquivo de sessão. É algum bug aqui comigo ou é algo que o Telegram mudou e causou isso? Até dois dias atrás estava normal.
clone

Keep program running

Hello, I want to run the program every time so that when it arrives a message to the source group it clones it to the destination group, is there any option to do this?

Clone a bot

Is it possible to clone messages in bot ?

Error: Non-accessible chat

This happens sometimes. Sometimes it works fine, but sometimes this error appears. I've checked several times to see if the chat id is correct. And it is! I don't know what is possibly wrong.
2023-04-01_13h01_45

Problemas com clone protect

Ao tentar usar o clonechat protect exibe o seguinte erro:
```
if not found:
UnboundLocalError: local variable 'found' referenced before assignment

RecursionError: maximum recursion depth exceeded

Todos os dias executo a sincronização de varios grupos e hoje me deparei com o seguinte retorno:

chunk = await asyncio.wait_for(

File "/usr/lib/python3.10/asyncio/tasks.py", line 426, in wait_for
fut = ensure_future(fut, loop=loop)
File "/usr/lib/python3.10/asyncio/tasks.py", line 615, in ensure_future
return _ensure_future(coro_or_future, loop=loop)
File "/usr/lib/python3.10/asyncio/tasks.py", line 636, in _ensure_future
return loop.create_task(coro_or_future)
File "/usr/lib/python3.10/asyncio/base_events.py", line 438, in create_task
task = tasks.Task(coro, loop=self, name=name)
File "/usr/lib/python3.10/asyncio/base_events.py", line 754, in call_soon
handle = self._call_soon(callback, args, context)
File "/usr/lib/python3.10/asyncio/base_events.py", line 770, in _call_soon
handle = events.Handle(callback, args, self, context)
File "/usr/lib/python3.10/asyncio/events.py", line 40, in init
if self._loop.get_debug():
RecursionError: maximum recursion depth exceeded
Task exception was never retrieved
future: <Task finished name='Task-26219' coro=<Session.ping_worker() done, defined at /usr/local/lib/python3.10/dist-packages/pyrogram/session/session.py:271> exception=RecursionError('maximum recursion depth exceeded while calling a Python object')>
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/pyrogram/session/session.py", line 283, in ping_worker
await self.send(
File "/usr/local/lib/python3.10/dist-packages/pyrogram/session/session.py", line 318, in send
message = self.msg_factory(data)
File "/usr/local/lib/python3.10/dist-packages/pyrogram/session/internals/msg_factory.py", line 37, in call
len(body)
File "/usr/local/lib/python3.10/dist-packages/pyrogram/raw/core/tl_object.py", line 79, in len
return len(self.write())
File "/usr/local/lib/python3.10/dist-packages/pyrogram/raw/functions/ping_delay_disconnect.py", line 72, in write
b.write(Int(self.ID, False))
File "/usr/local/lib/python3.10/dist-packages/pyrogram/raw/core/primitives/int.py", line 33, in new
return value.to_bytes(cls.SIZE, "little", signed=signed)
RecursionError: maximum recursion depth exceeded while calling a Python object
Task was destroyed but it is pending!
task: <Task pending name='Task-36516' coro=<StreamReader.read() done, defined at /usr/lib/python3.10/asyncio/streams.py:628>>
Task was destroyed but it is pending!
task: <Task pending name='Task-35556' coro=<Event.wait() running at /usr/lib/python3.10/asyncio/locks.py:214> wait_for=>
MODE='user'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.