Comments (8)
the from
and to
fields can be either chat id or visible name
NEW FEATURE: 🎉 You may use the chat_id instead of the visible name. To get the chat id of a particular chat/group/channel run get_chat_id.py
and then enter the user-name/phone/link of the chat.
An example is here:
the integer you get in the second line of output is the chat id
After getting the chat id you can use this in the config.ini
file:
[my config]
from = 90984098590
to = My Channel
offset = 0
; the from and to fields can be either chat id or visible name
from tgcf.
@lit34 Please test the new feature, and give your feedback.
from tgcf.
Thank you for your quick response. I tried again with the new chat ids but I receive an error
"ValueError: Could not find the input entity for <telethon.tl.types.PeerUser object at 0x000002700F7EFEE0>"
After I research a little on internet I found a solution here
https://www.xspdf.com/resolution/53139794.html
"Every channel id is a 13 characters negative integer. So the id for this channel is -1001035716040 and not 1035716040 as printed."
So I modified chat ids by putting -100 in front of them. It worked! Now the only problem I encounter is the flood messages that forces the script to take 5 min pause. If there are many files to be copied the pause is getting bigger, 60 minutes. I guess there are some limits that Telegram enforces. Are these known? Maybe an option to copy at a slower pace will not trigger these bans? A nice enhancement could be the option to copy only some types of posts and exclude others (video, audio, photos, links, excluding posts that contain certain words etc).
Thank you again for your effort, your script is the only one that worked for me, and I tried quite a few of them.
from tgcf.
hi @lit34 you can easily get chat ids by running get_chat_id.py
. And it works, directly, I have tested.
You don't need to add -100
in front.
I think you made some kind of error.
I highly recommend using visible names
. If visible names collide, then take the link of the channel/group and generate the chat id.
FloodWait is caused by Telegram, because it puts some limitations on the no. of messages you can send in a given time.
Sending messages slowly is a bad idea, in my opinion. That will take more total time, for a person who has fewer messages.
Waiting when we encounter FloodLimits is better.
from tgcf.
For general help and discussion please chat with me on Telegram.
from tgcf.
A nice enhancement could be the option to copy only some types of posts and exclude others (video, audio, photos, links, excluding posts that contain certain words etc).
Thats a good idea, but I am currently busy with other work. You are most welcome to contribute the new feature.
from tgcf.
@lit34 From now on, you can directly use username in from
and to
from tgcf.
I deleted all and setup a fresh configuration. Now it works! Keep up the good work!
from tgcf.
Related Issues (20)
- What the f#ck is this HOT 1
- tgcf-web not found
- Forward restricted media HOT 2
- Digital Ocean App version is outdated (Running tgcf 1.1.7.post1) HOT 3
- Bot Token Not Found HOT 1
- WARNING: The requested image's platform (linux/amd64) does not match the detected host platform HOT 1
- rm: logs_n_lines.txt: No such file or directory HOT 4
- Redirection not working HOT 8
- How to forward from private channels in which user is a subscriber but doesn't have invite link of it HOT 1
- It no longer works! ded repo don't waste ur time on this repo, dev doesn't care anymore. HOT 2
- Update tgcf 1.1.8 dependencies (rich 13.7.0)
- Docker Container Lost Settings after Restart or container HOT 4
- Topics Support HOT 9
- Security error while unpacking a received message HOT 1
- Please add filter option for each and every connection seperately
- ERROR: Failed building wheel for Pillow
- docker image pull HOT 1
- desktop mode unable to scroll for new connections after 7 connections
- Plugin to prevent forwarding of recent duplicate messages
- Doesn't work for big channels HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tgcf.