Comments (40)
Did you test the string by sending a message
from save-restricted-bot.
What do you mean? I didn't understand. I just sent a message to the bot containing the link to the private post, and it returned the above error. Did I do something wrong? Should I have tested the string? If so, how? I thank you if you would like to help me.
from save-restricted-bot.
from save-restricted-bot.
No, I don't know how to do that. How should I test the validity of my string? I thought the string was valid since it was generated by Pyrogram.
from save-restricted-bot.
Login with that and try sending a message, also show me a screenshot of the chat with your bot
from save-restricted-bot.
How do I log in with that? When I send links to public channel posts, the bot manages to download the various contents quickly and smoothly. On the other hand, when I try to send links to private channel posts, the bot returns the above error.
from save-restricted-bot.
Using Pyrogram
from save-restricted-bot.
How can I log with this? Thank you for your availability. I've tried using Replit, but it didn't work.
This was the error:
Traceback (most recent call last):
File "main.py", line 54, in <module>
main()
File "main.py", line 17, in main
with Client(":memory:", api_id=APP_ID, api_hash=API_HASH) as app:
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pyrogram/client.py", line 251, in __enter__
return self.start()
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pyrogram/sync.py", line 66, in async_to_sync_wrap
return loop.run_until_complete(coroutine)
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pyrogram/methods/utilities/start.py", line 52, in start
is_authorized = await self.connect()
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pyrogram/methods/auth/connect.py", line 39, in connect
await self.load_session()
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pyrogram/client.py", line 689, in load_session
await Auth(
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pyrogram/session/auth.py", line 254, in create
raise e
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pyrogram/session/auth.py", line 89, in create
res_pq = await self.send(raw.functions.ReqPqMulti(nonce=nonce))
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pyrogram/session/auth.py", line 67, in send
return self.unpack(response)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pyrogram/session/auth.py", line 60, in unpack
return TLObject.read(b)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pyrogram/raw/core/tl_object.py", line 33, in read
return cast(TLObject, objects[int.from_bytes(b.read(4), "little")]).read(b, *args)
KeyError: 0
from save-restricted-bot.
I tried to authenticate with the help of Pyrogram, using a Telegram bot to generate a string. The authentication was successful. However, when I send a message to the bot, the bot replies with this error: "Telegram says: [400 MESSAGE_EMPTY] - The message sent is empty or contains invalid characters (caused by "messages.SendMessage")". As previously mentioned, I have no problem downloading posts from public channels. In fact, the above-mentioned error only occurs when I send a link to a post from a private channel of which I am a member. For the sake of completeness, I also attach a screenshot of my chat with the bot.
Please let me know how to solve this problem.
from save-restricted-bot.
Session string will not be used for public chats hence it working
from save-restricted-bot.
I will make a new replit soon
from save-restricted-bot.
from save-restricted-bot.
Was this solved? Because I'm getting the same problem with private channels, even if a member. Getting ERROR [400 CHANNEL_INVALID] - The channel parameter is invalid (caused by "channels.GetChannels").
from save-restricted-bot.
from save-restricted-bot.
Another error I'm getting with other private channel of which I'm member is the following: «Telegram says: [400 MESSAGE_EMPTY] - The message sent is empty or contains invalid characters (caused by "messages.SendMessage")».
from save-restricted-bot.
No, it wasn't solved. I'm waiting for the developer to fix this issue. I hope that this problem will be solved soon, as this bot is really powerful, and I love it. Il giorno mer 25 ott 2023 alle ore 18:40 Feastsandfires < @.***> ha scritto:
…
Ah, ok. Thanks for the reply.
from save-restricted-bot.
Another error I'm getting with other private channel of which I'm member is the following: «Telegram says: [400 MESSAGE_EMPTY] - The message sent is empty or contains invalid characters (caused by "messages.SendMessage")».
Oh, I haven’t gotten this one. Just the other one about the channel being invalid. It happens with private channels already a member of. Not sure why.
from save-restricted-bot.
Another error I'm getting with other private channel of which I'm member is the following: «Telegram says: [400 MESSAGE_EMPTY] - The message sent is empty or contains invalid characters (caused by "messages.SendMessage")».
Oh, I haven’t gotten this one. Just the other one about the channel being invalid. It happens with private channels already a member of. Not sure why.
Depending on the private channel, I get the first or second error. I hope this problem will be resolved as soon as possible.
from save-restricted-bot.
Replit is updated, check now
from save-restricted-bot.
idk why isnt working on replit, use that locally
from save-restricted-bot.
from save-restricted-bot.
Come hai fatto a usare Replit localmente? Ok. Ora, provo a ottenere una
nuova stringa.
I mean copy the file contents and run locally
from save-restricted-bot.
from save-restricted-bot.
Should I copy even the files 'poetry.lock' and 'pyproject.toml'?
Don't you experience with python? You only need main.py
from save-restricted-bot.
from save-restricted-bot.
Now, I can download content from a good number of private channels. However, with one private channel in particular (I don't know why), I get the following message: 'Error : Telegram says: [400 CHANNEL_INVALID] - The channel parameter is invalid (caused by "channels.GetChannels")'.
I tried to start it not from my main account, i.e. the one with which I created the bot, but from another one. I don't think this is the cause of the above-mentioned error, also because I only got this response after I had sent the link to the post of a specific channel.
Anyway, I will now try the same operation from my main account, making sure I am added to the channel whose content I want to get, and I will inform you of the outcome. In the meantime, if you have any further suggestions, please do not hesitate to share them with me.
from save-restricted-bot.
You have to be in that channel to work or first you need to send an invite link to the bot
from save-restricted-bot.
Now, I can download content from a good number of private channels. However, with one private channel in particular (I don't know why), I get the following message: 'Error : Telegram says: [400 CHANNEL_INVALID] - The channel parameter is invalid (caused by "channels.GetChannels")'.
I tried to start it not from my main account, i.e. the one with which I created the bot, but from another one. I don't think this is the cause of the above-mentioned error, also because I only got this response after I had sent the link to the post of a specific channel.
Anyway, I will now try the same operation from my main account, making sure I am added to the channel whose content I want to get, and I will inform you of the outcome. In the meantime, if you have any further suggestions, please do not hesitate to share them with me.
How did you run the replit locally? I can't even find any files to copy. Because when I run the replit link by author and enter the variables, I get an error. Doesn't work. I get KeyError: 0. Exit status 1.
from save-restricted-bot.
How did you run the replit locally? I can't even find any files to copy. Because when I run the replit link by author and enter the variables, I get an error. Doesn't work. I get KeyError: 0. Exit status 1.
i update it to gist, use that
from save-restricted-bot.
How did you run the replit locally? I can't even find any files to copy. Because when I run the replit link by author and enter the variables, I get an error. Doesn't work. I get KeyError: 0. Exit status 1.
i update it to gist, use that
Thank you. Unfortunately, it's still not printing a string. I only see my api_id that is printed, and it doesn't show anything else.
from save-restricted-bot.
Thank you. Unfortunately, it's still not printing a string. I only see my api_id that is printed, and it doesn't show anything else.
What?, i don't understand.
from save-restricted-bot.
Thank you. Unfortunately, it's still not printing a string. I only see my api_id that is printed, and it doesn't show anything else.
What?, i don't understand.
When i debug run the code, main.py, with hash and id, what prints out is only the id again. Nothing else after. It says, "Telegram String Generator my API_id."
from save-restricted-bot.
When i debug run the code, main.py, with hash and id, what prints out is only the id again. Nothing else after. It says, "Telegram String Generator my API_id."
It is waiting for your input, you have to enter API ID
from save-restricted-bot.
I will close this, reopen if needed
from save-restricted-bot.
When i debug run the code, main.py, with hash and id, what prints out is only the id again. Nothing else after. It says, "Telegram String Generator my API_id."
It is waiting for your input, you have to enter API ID
I did. I put in both id and hash, and it gives me back my id again as the string. Strange.
from save-restricted-bot.
I sent a message to the bot with the link to the channel, and the bot replied like this: "Error : Telegram says: [400 USER_ALREADY_PARTICIPANT] - The user is already a participant of this chat (caused by "messages.ImportChatInvite")".
So, it means that I am already a member of the channel; however, when I go to resubmit the link to the channel post, I still get the same error as before, which is as follows: "Error : Telegram says: [400 MESSAGE_EMPTY] - The message sent is empty or contains invalid characters (caused by "messages.SendMessage")".
This only happens to me with one particular channel. I don't know if I experience the same inconvenience with others. I hope this will be resolved.
from save-restricted-bot.
Get the latest version
from save-restricted-bot.
Should I, therefore, download the bot again and reconfigure it? OK, I will do that.
from save-restricted-bot.
OK. Now, the bot seems to be working. I have noticed that when I send the link to the bot, I get the same URL in the command prompt window, as well as the fact that an empty 'Download' subdirectory is created in the bot's directory. How does this work? Do I have the option of saving the files, i.e. videos and photos, on my PC? If yes, how? Thank you for making the necessary corrections and for taking the time to improve your script. I will be sure to inform you if I notice any malfunctions or problems, but I don't think this will happen. I look forward to your feedback and thank you in advance.
from save-restricted-bot.
It works now. Thanks. My string didn't change, but something in the code (I recloned it) worked. Super. (^^🖒)
from save-restricted-bot.
Related Issues (20)
- Issue in downloading files HOT 6
- Running main.py Error HOT 2
- how to save restricted data from Private Group HOT 1
- Not an issue HOT 2
- #Features Request HOT 3
- add timer in bulk mode. my 1 telegram account banned because of saving .
- struct.error: unpack requires a buffer of 271 bytes
- Error while saving files
- Help HOT 1
- bot cant copy Poll (multiple choice post)
- Error when running the bot HOT 1
- error R15
- yoo i tried literally all night and my brain is bout to exploade!! ill try some more for sure but help :0 HOT 1
- Feature Request HOT 2
- #FeatureRequest HOT 2
- Little bit improvement 😕 HOT 3
- I need help to get ID from bot message HOT 4
- Error ❌
- Please add Cancel button and Logging
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 save-restricted-bot.