fertkir / tg-torrent-bot

Telegram bot implementation for torrents search and download
MIT License
0 stars 1 forks source link

Add support Heroku #13

Closed rinrinx closed 2 years ago

rinrinx commented 2 years ago

bro can you add support for heroku

fertkir commented 2 years ago

Hi, I've never used it... Do you want the bot to deploy to Heroku? Do you have any samples of what you want?

rinrinx commented 2 years ago

https://github.com/anasty17/mirror-leech-telegram-bot

Exp this

fertkir commented 2 years ago

As far as I understand, I just need to apt install tg-torrent-bot in Dockerfile, like here: https://github.com/anasty17/mirror-leech-telegram-bot/blob/heroku/Dockerfile

Okay, if that's what you want, why not.

rinrinx commented 2 years ago

https://github.com/anasty17/mirror-leech-telegram-bot/tree/master/.github/workflows

https://github.com/anasty17/mirror-leech-telegram-bot/blob/master/Dockerfile

https://github.com/anasty17/mirror-leech-telegram-bot/blob/master/heroku.yml

https://dashboard.heroku.com/apps

rinrinx commented 2 years ago

These are the requirements to be able to run Heroku

fertkir commented 2 years ago

I see. Sure, I can add these files. But how are you going to use the bot on Heroku? There's no much use of saving .torrent files to docker container... Do you need to get magnet-links only?

rinrinx commented 2 years ago

Let me give you an example, you can do it in the form of a command

For example, the Torrent Bittorrent client may have a telegram download feature. or aria2c

Heroku will run the bot, but this will happen in telegram. bot telegram can be added command to support both magnet and torrent file

rinrinx commented 2 years ago

If you install anasty bot you can understand the integration between Heroku and telegram.

fertkir commented 2 years ago

I've added deployment to heroku, check: https://github.com/fertkir/tg-torrent-bot/blob/main/Dockerfile https://github.com/fertkir/tg-torrent-bot/blob/main/.github/workflows/heroku-deploy.yml

rinrinx commented 2 years ago

2022-05-06T04:49:58.446290+00:00 heroku[worker.1]: State changed from starting to up 2022-05-06T04:49:59.235766+00:00 app[worker.1]: Fri, 06 May 2022 04:49:59 GMT node-telegram-bot-api deprecated Automatic enabling of cancellation of promises is deprecated. 2022-05-06T04:49:59.235783+00:00 app[worker.1]: In the future, you will have to enable it yourself. 2022-05-06T04:49:59.235783+00:00 app[worker.1]: See https://github.com/yagop/node-telegram-bot-api/issues/319. at internal/modules/cjs/loader.js:999:30 2022-05-06T04:49:59.951594+00:00 app[worker.1]: events.js:291 2022-05-06T04:49:59.951603+00:00 app[worker.1]: throw er; // Unhandled 'error' event 2022-05-06T04:49:59.951604+00:00 app[worker.1]: ^ 2022-05-06T04:49:59.951604+00:00 app[worker.1]: 2022-05-06T04:49:59.951605+00:00 app[worker.1]: Error: ENOENT: no such file or directory, open 'undefined/6154419.torrent' 2022-05-06T04:49:59.951605+00:00 app[worker.1]: Emitted 'error' event on WriteStream instance at: 2022-05-06T04:49:59.951606+00:00 app[worker.1]: at errorOrDestroy (internal/streams/destroy.js:108:12) 2022-05-06T04:49:59.951606+00:00 app[worker.1]: at WriteStream.onerror (_stream_readable.js:754:7) 2022-05-06T04:49:59.951606+00:00 app[worker.1]: at WriteStream.emit (events.js:314:20) 2022-05-06T04:49:59.951606+00:00 app[worker.1]: at internal/fs/streams.js:361:12 2022-05-06T04:49:59.951607+00:00 app[worker.1]: at FSReqCallback.oncomplete (fs.js:156:23) { 2022-05-06T04:49:59.951607+00:00 app[worker.1]: errno: -2, 2022-05-06T04:49:59.951608+00:00 app[worker.1]: code: 'ENOENT', 2022-05-06T04:49:59.951608+00:00 app[worker.1]: syscall: 'open', 2022-05-06T04:49:59.951608+00:00 app[worker.1]: path: 'undefined/6154419.torrent' 2022-05-06T04:49:59.951608+00:00 app[worker.1]: }

rinrinx commented 2 years ago

Screenshot_2022-05-06-07-55-41-704_it owlgram android

Get link work but download not work bot down

fertkir commented 2 years ago

Because when you click Download, the bot saves .torrent file to a directory on the server. This is because it was intended for deployment on your home servers.

Do you want it to send .torrent file in reply message?

rinrinx commented 2 years ago

yes, download the torrent to any directory, then send it to telegram as a message

fertkir commented 2 years ago

Okay, I'll do it

rinrinx commented 2 years ago

thank yo sir

fertkir commented 2 years ago

check it now

rinrinx commented 2 years ago

Screenshot_2022-05-07-00-54-12-970_it owlgram android its work thank you sir😊

fertkir commented 2 years ago

You're welcome