Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to save restricted data from Private Group #29

Open
mehrdad-data opened this issue Nov 23, 2023 · 1 comment
Open

how to save restricted data from Private Group #29

mehrdad-data opened this issue Nov 23, 2023 · 1 comment

Comments

@mehrdad-data
Copy link

Hi
First thanks for your great work. the bot work perfect on channel content.
I try to use this bot to save restricted post on Private Group in Telegram.
bot I got below Error. Is it any solution?
Thanks a lot

https://t.me/c/0000000000/1137
Telegram says: [400 CHANNEL_INVALID] - The channel parameter is invalid (caused
by "channels.GetChannels")
Traceback (most recent call last):
File "C:\python\lib\site-packages\pyrogram\methods\advanced\resolve_peer.py",
line 62, in resolve_peer
return await self.storage.get_peer_by_id(peer_id)
File "C:\python\lib\site-packages\pyrogram\storage\sqlite_storage.py", line 14
2, in get_peer_by_id
raise KeyError(f"ID not found: {peer_id}")
KeyError: 'ID not found: -0000000000'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\python\lib\site-packages\pyrogram\dispatcher.py", line 242, in handle
r_worker
await self.loop.run_in_executor(
File "C:\python\lib\concurrent\futures\thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "main.py", line 113, in save
handle_private(message,chatid,msgid)
File "main.py", line 150, in handle_private
msg: pyrogram.types.messages_and_media.message.Message = acc.get_messages(ch
atid,msgid)
File "C:\python\lib\site-packages\pyrogram\sync.py", line 78, in async_to_sync
_wrap
return asyncio.run_coroutine_threadsafe(coroutine, main_loop).result()
File "C:\python\lib\concurrent\futures_base.py", line 439, in result
return self.__get_result()
File "C:\python\lib\concurrent\futures_base.py", line 388, in __get_result
raise self._exception
File "C:\python\lib\site-packages\pyrogram\methods\messages\get_messages.py",
line 101, in get_messages
peer = await self.resolve_peer(chat_id)
File "C:\python\lib\site-packages\pyrogram\methods\advanced\resolve_peer.py",
line 111, in resolve_peer
await self.invoke(
File "C:\python\lib\site-packages\pyrogram\methods\advanced\invoke.py", line 7
9, in invoke
r = await self.session.invoke(
File "C:\python\lib\site-packages\pyrogram\session\session.py", line 389, in i
nvoke
return await self.send(query, timeout=timeout)
File "C:\python\lib\site-packages\pyrogram\session\session.py", line 357, in s
end
RPCError.raise_it(result, type(data))
File "C:\python\lib\site-packages\pyrogram\errors\rpc_error.py", line 91, in r
aise_it
raise getattr(
pyrogram.errors.exceptions.bad_request_400.ChannelInvalid: Telegram says: [400 C
HANNEL_INVALID] - The channel parameter is invalid (caused by "channels.GetChannels")

@khushveer007
Copy link

You link in incorrect
There's no channel with 000000000 I'd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants