Giter Site home page Giter Site logo

saucenao-search-tgbot's Introduction

SauceNAO search bot for telegram

Add friend: @SauceNAO_Search_bot

preview

Deploy

Heroku

Make sure you have Heroku CLI installed beforehand.

  1. Create a app on Heroku
  2. Add Heroku Postgres to your app
  3. Clone this repo
  4. Create a .env file with following details
SAUCENAO_APIKEY=
TG_TOKEN=
WEBHOOK_URL=
DEBUG=saucenao-tg:*
DATABASE_URL=
MINIUM_SIMILARITY=50
MAX_RESULT_COUNT=3
  1. Remove .env from .gitignore and commit
  2. heroku git -a YOUR_APP_NAME
  3. git push heroku master

WEBHOOK_URL

It should be https://your-app-name.herokuapp.com.

DATABASE_URL

In the dashboard of your Heroku app, click the Heroku Postgres addon and go to the setting page and find the value of URI. Simply fill it to DATABASE_URL.

Local

  1. Clone this repo
  2. Create a .env file with following details
SAUCENAO_APIKEY=
TG_TOKEN=
WEBHOOK_URL=
DEBUG=saucenao-tg:*
DATABASE_URL=
MINIUM_SIMILARITY=50
MAX_RESULT_COUNT=3
  1. yarn start or npm start

WEBHOOK_URL

It is some URL that is publicly accessible through the Internet. For example, http://your.domain.com or http://123.45.67.89 (Your ip)

DATABASE_URL

You can install a PostgreSQL on your local computer or find some PostgreSQL as a service to use.

The format of DATABASE_URL should be: postgresql://DB_USER:DB_USER_PASS@DB_URL:DB_PORT/DB_NAME

Local deploy without a publicly accessible ip

Replace this line with polling: true, and remove these lines too.

saucenao-search-tgbot's People

Contributors

maple3142 avatar soulspark666 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

saucenao-search-tgbot's Issues

Issue trying to update it!

When I tried to update the code form 801cab2550003b169f7b444dddc27bb5cb29df63 with the latest a5ba77b9e712ad8302d95a5f569e3c98d03f3c4e, I am getting the following error in heroku logs:

2020-10-06T15:52:15.000000+00:00 app[api]: Build succeeded

2020-10-06T15:52:18.203958+00:00 heroku[web.1]: Process exited with status 1

2020-10-06T15:52:18.233277+00:00 heroku[web.1]: State changed from starting to crashed

2020-10-06T15:52:18.142786+00:00 app[web.1]: 

2020-10-06T15:52:18.142801+00:00 app[web.1]: > [email protected] start /app

2020-10-06T15:52:18.142802+00:00 app[web.1]: > tsc && node dist/index.js

2020-10-06T15:52:18.142802+00:00 app[web.1]: 

2020-10-06T15:52:18.147746+00:00 app[web.1]: sh: 1: tsc: not found

2020-10-06T15:52:18.152087+00:00 app[web.1]: npm ERR! code ELIFECYCLE

2020-10-06T15:52:18.152398+00:00 app[web.1]: npm ERR! syscall spawn

2020-10-06T15:52:18.152607+00:00 app[web.1]: npm ERR! file sh

2020-10-06T15:52:18.152867+00:00 app[web.1]: npm ERR! errno ENOENT

2020-10-06T15:52:18.154962+00:00 app[web.1]: npm ERR! [email protected] start: `tsc && node dist/index.js`

2020-10-06T15:52:18.155106+00:00 app[web.1]: npm ERR! spawn ENOENT

2020-10-06T15:52:18.155278+00:00 app[web.1]: npm ERR! 

2020-10-06T15:52:18.155429+00:00 app[web.1]: npm ERR! Failed at the [email protected] start script.

2020-10-06T15:52:18.155555+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

2020-10-06T15:52:18.163367+00:00 app[web.1]: 

2020-10-06T15:52:18.163551+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:

2020-10-06T15:52:18.163690+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2020-10-06T15_52_18_156Z-debug.log

2020-10-06T15:52:25.484592+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/bot986580568:AAHSTWsC4cWmh7NGyLIKYOEHdu11RpiCNNA" host=saucenao.herokuapp.com request_id=524bf53c-2b5c-4c63-b22e-1b1b5973e2a7 fwd="91.108.6.107" dyno= connect= service= status=503 bytes= protocol=https

2020-10-06T15:53:25.505975+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/bot986580568:AAHSTWsC4cWmh7NGyLIKYOEHdu11RpiCNNA" host=saucenao.herokuapp.com request_id=8f15e9b2-d5f9-436a-a03b-db9a11ba8424 fwd="91.108.6.107" dyno= connect= service= status=503 bytes= protocol=https

Please let me know if I may be doing something wrong

Not Working

I tried to deploy it as it is told but it is showing some errors.
error

Please Help

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.