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

Fixed BIN_CHANNEL delete problem, added more variables and much more #67

Closed

Conversation

TheHimanshuRastogi
Copy link

Hello @EverythingSuckz, I'm using TG-FileStreamBot for a long time, but problem is whenever BIN_CHANNEL gets deleted, users lost all the links that they generated before and it's a big issue for those who generate multiple links and telegram deletes the BIN_CHANNEL, to fix this problem i've changed the working mechanism of bot now whenever user will request a file, bot will immediately sent it to BIN_CHANNEL and stream it. Isn't it interesting?

Here is the list of changes i made.

@EverythingSuckz
Copy link
Owner

Thank you for this PR and before moving to further steps, I have thought about this idea but we have a few (major) issues:

  • The code quality needs a littile bit of refactoring and seems like there is a lot of commits for 6 file changes.
  • It totally breaks the Multi-Client support.
    Since we are using file_id here, just remember that file IDs are not universal (ie, file ID generated by one bot can't be used by other bots) Refer this
  • Imagine someone spamming the url with requests and with each request, it's basically spamming the channel which might result in Floodwaits later on making the bot unusable. Also I do think that the route function gets called each time you request for another chunk of bytes. (not really sure about this)

@TheHimanshuRastogi
Copy link
Author

  • Actully i just created a new branch named update And changed 6 files there but i don't know how all of my previous editing is showing there? I think i made some mistake while makinga PR.
  • As you told that file id's are not universal, i agree with it but I've tried mith MULTI_CLIENT too and it's perfectly working without any issues.
  • As you said people if people spam with requests then we can enable auto delete for 1 day in channel so that bot'll delete all the files in 1 day.
  • To solve the spamming problem maybe you can do something like bot will get device details, ip address or something like that and if it looks like user is spamming than bot'll ban that particular IP address for some time. This is only my imagination, as i don't know much about aiohttp so it would be better of you try to do so.

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

Successfully merging this pull request may close these issues.

None yet

2 participants