Arkanic / Dredbot2

dredbot, re-written
0 stars 0 forks source link

How to host in in Repl.it hosting? #1

Closed ThePolishCat closed 2 years ago

ThePolishCat commented 2 years ago

How to host in in Repl.it hosting?

Arkanic commented 2 years ago

https://replit.com/@TAL0S/Dredbot2

You will need to setup a MongoDB atlas server as well as the bot on the repl.it site

on the replit secrets tab: set PREFIX in secrets to ";" set TOKEN to your discord bot token set MONGODB to your mongodb atlas login link

then run npm i on the shell npm run prod to start

invite the bot to your server

if you want the bot to stay up 24/7 you will need to use uptimerobot to ping it every 5 minutes

ThePolishCat commented 2 years ago

thanks :D

ThePolishCat commented 2 years ago

` npm run prod

dredbot2@1.0.0 prod /home/runner/Dredbot21 npm run build && npm run run

dredbot2@1.0.0 build /home/runner/Dredbot21 npm run clean && npm run tsc

dredbot2@1.0.0 clean /home/runner/Dredbot21 rm -rf build

dredbot2@1.0.0 tsc /home/runner/Dredbot21 tsc --build --verbose

[7:23:19 PM] Projects in this build:

[7:23:19 PM] Project 'tsconfig.json' is out of date because output file 'build/cache.js' does not exist

[7:23:19 PM] Building project '/home/runner/Dredbot21/tsconfig.json'...

dredbot2@1.0.0 run /home/runner/Dredbot21 node build/server.js

Loaded help Loaded ldb Loaded players Loaded test Loaded velocity /home/runner/Dredbot21/build/cache/leaderboard.js:61 this.cycleShipsChunk(response.body.ships[0].score); ^

TypeError: Cannot read property '0' of undefined at /home/runner/Dredbot21/build/cache/leaderboard.js:61:53 at done (/home/runner/Dredbot21/node_modules/needle/lib/needle.js:469:14) at PassThrough. (/home/runner/Dredbot21/node_modules/needle/lib/needle.js:720:9) at PassThrough.emit (events.js:375:28) at endReadableNT (internal/streams/readable.js:1317:12) at processTicksAndRejections (internal/process/task_queues.js:82:21) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! dredbot2@1.0.0 run: node build/server.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the dredbot2@1.0.0 run script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/runner/.npm/_logs/2021-10-29T19_23_37_252Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! dredbot2@1.0.0 prod: npm run build && npm run run npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the dredbot2@1.0.0 prod script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/runner/.npm/_logs/2021-10-29T19_23_37_324Z-debug.log exit status 1`

hmm error

Arkanic commented 2 years ago

it will be because the drednot leaderboard API changed a couple of weeks ago, and i haven't edited the code yet. If you want to fork the repository and fix it yourself you can do that (all you will need to do is change the link in leaderboard.ts to the right one in #news on the drednot discord)