FilesBot
FilesBot copied to clipboard
Sequence of file link Robot Generate is just numbers
Please generate a random word ( 10 or 15 Characters For Example) after each message robot receive and send it to linked channel of Robot, after message itself say "ra2nd1o5mw3ord"
so the link the bot generate will be ( id number of message in Linked channel of Bot)
https://t.me/FilesBot?start=ra2nd1o5mw3ord_id https://t.me/FilesBot?start=ra2nd1o5mw3ord_10 instead of
https://t.me/FilesBot?start=view_10_tg for 10th message in the Linked Channel of Robot
so that random users can't find bot files Thanks
If I have bot username, I will generate all links like https://t.me/FilesBot?start=view_12_tg https://t.me/FilesBot?start=view_109_tg
and see the files users forwarded to bot
but this way, Random users can only access Files, if they have exact word in link
@SpEcHiDe time to use uuid :-)
Uhm, it makes sense
I think, need a database if this needs to be implemented.
I think, need a database if this needs to be implemented.
No, it’s not needed, you can use some algorithms
Wait, it’s not possibile with an algorithm without using a db. Sorry I was wrong.
I’m thinking about it, let’s see if I find something
it is not impossible, ideally you can use any algorithm which supports 2 way hashing (and returns a hash less than 64 characters), but I think not using a DB is over-engineering the problem..😅
Yeah but:
- 2 way hashing is useless: everyone can access any file
- In order to use DB on heroku you have to use Heroku’s own DB, and this prevent the bot to be hosted in other places
Also, if we’ll use a 2 way hashing, I’d like to use my own base26 encoding, that encodes every int in a string composed by only a-z lowercase letters
- I think we can override DATABASE_URL but I am not sure about it.
Adding the DataBase to bot is useful to many users.It will be fast enough.